Class TypeTransformationParser
- java.lang.Object
-
- com.google.javascript.jscomp.parsing.TypeTransformationParser
-
public final class TypeTransformationParser extends java.lang.Object
A parser for the type transformation expressions (TTL-Exp) as in@template T := TTL-Exp =:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TypeTransformationParser.Keywords
Keywords of the type transformation languagestatic class
TypeTransformationParser.OperationKind
The classification of the keywords
-
Constructor Summary
Constructors Constructor Description TypeTransformationParser(java.lang.String typeTransformationString, StaticSourceFile sourceFile, ErrorReporter errorReporter, int templateLineno, int templateCharno)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
getTypeTransformationAst()
boolean
parseTypeTransformation()
Takes a type transformation expression, transforms it to an AST using the ParserRunner of the JSCompiler and then verifies that it is a valid AST.
-
-
-
Constructor Detail
-
TypeTransformationParser
public TypeTransformationParser(java.lang.String typeTransformationString, StaticSourceFile sourceFile, ErrorReporter errorReporter, int templateLineno, int templateCharno)
-
-
Method Detail
-
getTypeTransformationAst
public Node getTypeTransformationAst()
-
parseTypeTransformation
public boolean parseTypeTransformation()
Takes a type transformation expression, transforms it to an AST using the ParserRunner of the JSCompiler and then verifies that it is a valid AST.- Returns:
- true if the parsing was successful otherwise it returns false and at least one warning is reported
-
-