Search in sources :

Example 1 with LiteralExpressionTree

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

the class Parser method parseRegularExpressionLiteral.

private ParseTree parseRegularExpressionLiteral() {
    SourcePosition start = getTreeStartLocation();
    LiteralToken literal = nextRegularExpressionLiteralToken();
    return new LiteralExpressionTree(getTreeLocation(start), literal);
}
Also used : ObjectLiteralExpressionTree(com.google.javascript.jscomp.parsing.parser.trees.ObjectLiteralExpressionTree) TemplateLiteralExpressionTree(com.google.javascript.jscomp.parsing.parser.trees.TemplateLiteralExpressionTree) ArrayLiteralExpressionTree(com.google.javascript.jscomp.parsing.parser.trees.ArrayLiteralExpressionTree) LiteralExpressionTree(com.google.javascript.jscomp.parsing.parser.trees.LiteralExpressionTree) SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition)

Example 2 with LiteralExpressionTree

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

the class Parser method parseLiteralExpression.

private LiteralExpressionTree parseLiteralExpression() {
    SourcePosition start = getTreeStartLocation();
    Token literal = nextLiteralToken();
    return new LiteralExpressionTree(getTreeLocation(start), literal);
}
Also used : ObjectLiteralExpressionTree(com.google.javascript.jscomp.parsing.parser.trees.ObjectLiteralExpressionTree) TemplateLiteralExpressionTree(com.google.javascript.jscomp.parsing.parser.trees.TemplateLiteralExpressionTree) ArrayLiteralExpressionTree(com.google.javascript.jscomp.parsing.parser.trees.ArrayLiteralExpressionTree) LiteralExpressionTree(com.google.javascript.jscomp.parsing.parser.trees.LiteralExpressionTree) SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition)

Aggregations

ArrayLiteralExpressionTree (com.google.javascript.jscomp.parsing.parser.trees.ArrayLiteralExpressionTree)2 LiteralExpressionTree (com.google.javascript.jscomp.parsing.parser.trees.LiteralExpressionTree)2 ObjectLiteralExpressionTree (com.google.javascript.jscomp.parsing.parser.trees.ObjectLiteralExpressionTree)2 TemplateLiteralExpressionTree (com.google.javascript.jscomp.parsing.parser.trees.TemplateLiteralExpressionTree)2 SourcePosition (com.google.javascript.jscomp.parsing.parser.util.SourcePosition)2