Search in sources :

Example 1 with RecordTypeTree

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

the class Parser method parseRecordTypeExpression.

private ParseTree parseRecordTypeExpression() {
    SourcePosition start = getTreeStartLocation();
    ParseTree typeExpression;
    if (peek(TokenType.OPEN_CURLY)) {
        eat(TokenType.OPEN_CURLY);
        typeExpression = new RecordTypeTree(getTreeLocation(start), parseInterfaceElements());
        eat(TokenType.CLOSE_CURLY);
    } else {
        typeExpression = parseTypeQuery();
    }
    return typeExpression;
}
Also used : SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition) RecordTypeTree(com.google.javascript.jscomp.parsing.parser.trees.RecordTypeTree) ParseTree(com.google.javascript.jscomp.parsing.parser.trees.ParseTree)

Aggregations

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