JetFile: BinaryTree.jet NAMESPACE CLASS PsiElement(class)('class') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('BinaryTree') TYPE_PARAMETER_LIST PsiElement(LT)('<') TYPE_PARAMETER PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') DELEGATION_SPECIFIER_LIST DELEGATOR_SUPER_CLASS TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('IMutableSet') TYPE_ARGUMENT_LIST PsiElement(LT)('<') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') PsiWhiteSpace(' ') CLASS_BODY PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') CLASS MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') PsiElement(class)('class') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('TreeNode') TYPE_PARAMETER_LIST PRIMARY_CONSTRUCTOR_PARAMETERS_LIST PsiElement(LPAR)('(') PsiWhiteSpace('\n ') PRIMARY_CONSTRUCTOR_PARAMETER PsiElement(var)('var') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(COMMA)(',') PsiWhiteSpace(' ') PRIMARY_CONSTRUCTOR_PARAMETER PsiElement(var)('var') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('parent') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiWhiteSpace('\n ') PsiElement(RPAR)(')') PsiWhiteSpace(' ') CLASS_BODY PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') PROPERTY PsiElement(var)('var') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiWhiteSpace('\n ') PROPERTY PsiElement(var)('var') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiWhiteSpace('\n\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') PROPERTY MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('compare') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('MatchableComparison') TYPE_ARGUMENT_LIST PsiElement(LT)('<') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') PsiWhiteSpace('\n ') PROPERTY MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') PsiElement(var)('var') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('root') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiWhiteSpace('\n ') PROPERTY MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') PsiElement(var)('var') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('version') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') PsiWhiteSpace('\n\n') PsiComment(EOL_COMMENT)('// override var size : Int { get; private set; }') PsiWhiteSpace('\n\n ') CONSTRUCTOR PsiElement(this)('this') VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('compare') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Comparison') TYPE_ARGUMENT_LIST PsiElement(LT)('<') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') PsiElement(RPAR)(')') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION THIS_EXPRESSION PsiElement(this)('this') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('asMatchableComparison') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('comparison') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') CONSTRUCTOR PsiElement(this)('this') VALUE_PARAMETER_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') INITIALIZER_LIST THIS_CALL PsiElement(this)('this') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('naturalOrder') TYPE_ARGUMENT_LIST PsiElement(LT)('<') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiElement(RPAR)(')') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') ATTRIBUTE_ANNOTATION PsiElement(LBRACKET)('[') ATTRIBUTE USER_TYPE PsiElement(IDENTIFIER)('operator') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('compareTo') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('other') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Int') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT THIS_EXPRESSION PsiElement(this)('this') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('other') PsiElement(RPAR)(')') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(override)('override') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('contains') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('item') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Boolean') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('contains') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(RPAR)(')') PsiWhiteSpace('\n\n ') FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('contains') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_PARAMETER PsiElement(IDENTIFIER)('item') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Boolean') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(false)('false') PsiWhiteSpace('\n ') BINARY_EXPRESSION CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(match)('match') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('EQ') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(true)('true') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('LS') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('contains') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('GT') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('contains') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(override)('override') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('add') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('item') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Boolean') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('add') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT PsiElement(ref)('ref') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY POSTFIX_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('size') PsiElement(PLUSPLUS)('++') PsiWhiteSpace('\n ') POSTFIX_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiElement(PLUSPLUS)('++') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(true)('true') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(false)('false') PsiWhiteSpace('\n\n ') PsiComment(EOL_COMMENT)('// In principle, this has access to item anyway, but then it's unreachable code') PsiWhiteSpace('\n ') PsiComment(EOL_COMMENT)('// BAD: the naive implementation of ref will create H(T) ref objects, but can be optimized to create only one') PsiWhiteSpace('\n ') FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('add') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER MODIFIER_LIST PsiElement(ref)('ref') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_PARAMETER PsiElement(IDENTIFIER)('parent') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Boolean') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('TreeNode') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('parent') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(true)('true') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') BINARY_EXPRESSION CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(match)('match') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('EQ') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(false)('false') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('LS') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('add') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT PsiElement(ref)('ref') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('GT') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('add') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT PsiElement(ref)('ref') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') PsiComment(EOL_COMMENT)('// In principle, this has access to item anyway') PsiWhiteSpace('\n ') FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('addNoRef') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Boolean') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('TreeNode') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(true)('true') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') BINARY_EXPRESSION CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(match)('match') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('EQ') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(false)('false') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('LS') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('TreeNode') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(true)('true') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace(' ') PsiElement(else)('else') PsiWhiteSpace(' ') ELSE RETURN PsiElement(return)('return') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('add') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('GT') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' \n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('TreeNode') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(true)('true') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace(' ') PsiElement(else)('else') PsiWhiteSpace(' ') ELSE RETURN PsiElement(return)('return') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('add') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(override)('override') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('remove') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('item') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Boolean') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('toRemove') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('find') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('toRemove') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(false)('false') PsiWhiteSpace('\n ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('remove') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('toRemove') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') POSTFIX_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('size') PsiElement(MINUSMINUS)('--') PsiWhiteSpace('\n ') POSTFIX_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiElement(PLUSPLUS)('++') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(true)('true') PsiWhiteSpace('\n\n ') FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('find') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN RETURN PsiElement(return)('return') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiWhiteSpace('\n ') BINARY_EXPRESSION CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(match)('match') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('EQ') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('LS') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('find') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('GT') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('find') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('remove') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(RPAR)(')') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(match)('match') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('TreeNode') TUPLE_PATTERN PsiElement(LPAR)('(') PATTERN NULL PsiElement(null)('null') PsiElement(COMMA)(',') PsiWhiteSpace(' ') PATTERN NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('replace') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('TreeNode') TUPLE_PATTERN PsiElement(LPAR)('(') PATTERN NULL PsiElement(null)('null') PsiElement(COMMA)(',') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('replace') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('TreeNode') TUPLE_PATTERN PsiElement(LPAR)('(') PATTERN USER_TYPE PsiElement(IDENTIFIER)('left') PsiElement(COMMA)(',') PsiWhiteSpace(' ') PATTERN NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('replace') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') MATCH_ENTRY PsiElement(case)('case') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('TreeNode') TUPLE_PATTERN PsiElement(LPAR)('(') PATTERN USER_TYPE PsiElement(IDENTIFIER)('left') PsiElement(COMMA)(',') PsiWhiteSpace(' ') PATTERN USER_TYPE PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('min') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('min') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('min') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiWhiteSpace('\n ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('remove') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('min') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('replace') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(COMMA)(',') PsiWhiteSpace(' ') VALUE_PARAMETER PsiElement(IDENTIFIER)('replace') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(RPAR)(')') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('replace') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('parent') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('parent') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('replace') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace(' ') PsiElement(else)('else') PsiWhiteSpace(' ') ELSE IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('parent') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('parent') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('replace') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace(' ') PsiElement(else)('else') PsiWhiteSpace(' ') ELSE CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Assert') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT BOOLEAN_CONSTANT PsiElement(false)('false') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') PsiComment(EOL_COMMENT)('// Relies on tail-recursion optimization') PsiWhiteSpace('\n ') FUN MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('min') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') VALUE_PARAMETER PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(RPAR)(')') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') PsiElement(else)('else') PsiWhiteSpace(' ') ELSE CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('min') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(override)('override') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('iterator') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('IIterator') TYPE_ARGUMENT_LIST PsiElement(LT)('<') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('mutableIterator') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(override)('override') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('mutableIterator') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('IMutableIterator') TYPE_ARGUMENT_LIST PsiElement(LT)('<') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiElement(GT)('>') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') OBJECT_LITERAL PsiElement(object)('object') PsiWhiteSpace(' ') DELEGATION_SPECIFIER_LIST DELEGATOR_SUPER_CLASS TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('IMutableIterator') PsiWhiteSpace(' ') CLASS_BODY PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('version') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('BinaryTree') PsiElement(DOT)('.') THIS_EXPRESSION PsiElement(this)('this') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiWhiteSpace('\n ') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('down') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Stack') TYPE_ARGUMENT_LIST PsiElement(LT)('<') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(GT)('>') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('up') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Stack') TYPE_ARGUMENT_LIST PsiElement(LT)('<') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiElement(GT)('>') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PROPERTY PsiElement(var)('var') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('lastNode') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiWhiteSpace('\n\n ') CONSTRUCTOR PsiElement(this)('this') VALUE_PARAMETER_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiWhiteSpace(' ') PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') THEN CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('down') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('push') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiElement(RPAR)(')') PsiWhiteSpace(' \n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(override)('override') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('next') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('T') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION PREFIX_EXPRESSION PsiElement(EXCL)('!') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('hasNext') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') THEN THROW PsiElement(throw)('throw') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('NoMoreElementsException') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('checkVersion') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n\n ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lastNode') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('nextNode') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lastNode') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('nextNode') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('TreeNode') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') WHILE PsiElement(while)('while') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BOOLEAN_CONSTANT PsiElement(true)('true') PsiElement(RPAR)(')') PsiWhiteSpace(' ') BODY FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION PREFIX_EXPRESSION PsiElement(EXCL)('!') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('down') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('isEmpty') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('curNode') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('down') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('pop') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('curNode') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('up') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('push') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('curNode') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('down') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('push') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('curNode') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace(' ') PsiElement(else)('else') PsiWhiteSpace(' ') ELSE FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('curNode') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('down') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('push') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('curNode') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('curNode') PsiElement(SEMICOLON)(';') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace(' ') PsiElement(else)('else') PsiWhiteSpace(' ') ELSE FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('curNode') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('up') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('pop') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('curNode') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('down') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('push') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('curNode') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') RETURN PsiElement(return)('return') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('curNode') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') PROPERTY MODIFIER_LIST PsiElement(override)('override') PsiWhiteSpace(' ') PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('hasNext') PsiWhiteSpace(' ') PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Boolean') PsiWhiteSpace('\n ') PROPERTY_ACCESSOR PsiElement(get)('get') PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') BINARY_EXPRESSION PREFIX_EXPRESSION PsiElement(EXCL)('!') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('down') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('isEmpty') PsiWhiteSpace(' ') PsiElement(OROR)('||') PsiWhiteSpace(' ') PREFIX_EXPRESSION PsiElement(EXCL)('!') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('up') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('isEmpty') PsiWhiteSpace('\n\n\n ') FUN MODIFIER_LIST PsiElement(override)('override') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('remove') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('checkVersion') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lastNode') PsiWhiteSpace(' ') PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') THEN THROW PsiElement(throw)('throw') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('IterationException') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT STRING_CONSTANT PsiElement(STRING_LITERAL)('"Nothing to remove"') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('remove') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lastNode') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') POSTFIX_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiElement(PLUSPLUS)('++') PsiWhiteSpace('\n ') BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('BinaryTree') PsiElement(DOT)('.') THIS_EXPRESSION PsiElement(this)('this') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('checkVersion') TYPE_PARAMETER_LIST VALUE_PARAMETER_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') IF PsiElement(if)('if') PsiWhiteSpace(' ') PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiWhiteSpace(' ') PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('BinaryTree') PsiElement(DOT)('.') THIS_EXPRESSION PsiElement(this)('this') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN FUNCTION_LITERAL PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY THROW PsiElement(throw)('throw') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('ConcurrentModificationException') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace(' \n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') PsiElement(RBRACE)('}')