boolean (boolean stopOnIn, boolean isTargetExpression) { SyntaxTreeBuilder.Marker expr = myBuilder.mark(); if (!parseStarExpression(isTargetExpression)) { expr.drop(); return false; } if (stopOnIn && atToken(PyTokenTypes.IN_KEYWORD)) { expr.drop(); return true; } while (PyTokenTypes.COMPARISON_OPERATIONS.contains(myBuilder.getTokenType())) { if (atToken(PyTokenTypes.NOT_KEYWORD)) { SyntaxTreeBuilder.Marker notMarker = myBuilder.mark(); myBuilder.advanceLexer(); if (!atToken(PyTokenTypes.IN_KEYWORD)) { notMarker.rollbackTo(); break; } notMarker.drop(); myBuilder.advanceLexer(); } else if (atToken(PyTokenTypes.IS_KEYWORD)) { myBuilder.advanceLexer(); if (myBuilder.getTokenType() == PyTokenTypes.NOT_KEYWORD) { myBuilder.advanceLexer(); } } else { myBuilder.advanceLexer(); } if (!parseBitwiseORExpression(isTargetExpression)) { myBuilder.error(message("PARSE.expected.expression")); } expr.done(PyElementTypes.BINARY_EXPRESSION); expr = expr.precede(); } expr.drop(); return true; }