Search in sources :

Example 1 with SuperExpressionTree

use of com.google.javascript.jscomp.parsing.parser.trees.SuperExpressionTree in project closure-compiler by google.

the class Parser method parseSuperExpression.

private SuperExpressionTree parseSuperExpression() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.SUPER);
    if (peek(TokenType.QUESTION_DOT)) {
        // super?.() not allowed
        reportError("Optional chaining is forbidden in super?.");
    }
    return new SuperExpressionTree(getTreeLocation(start));
}
Also used : SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition) SuperExpressionTree(com.google.javascript.jscomp.parsing.parser.trees.SuperExpressionTree)

Aggregations

SuperExpressionTree (com.google.javascript.jscomp.parsing.parser.trees.SuperExpressionTree)1 SourcePosition (com.google.javascript.jscomp.parsing.parser.util.SourcePosition)1