Class TypeTransformationParser

java.lang.Object
com.google.javascript.jscomp.parsing.TypeTransformationParser

public final class TypeTransformationParser extends Object
A parser for the type transformation expressions (TTL-Exp) as in @template T := TTL-Exp =:
  • Constructor Details

    • TypeTransformationParser

      public TypeTransformationParser(String typeTransformationString, StaticSourceFile sourceFile, ErrorReporter errorReporter, int templateLineno, int templateCharno)
  • Method Details

    • 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