Class JsDocInfoParser

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

public final class JsDocInfoParser extends Object
A parser for JSDoc comments.
  • Field Details

  • Constructor Details

  • Method Details

    • getSourceFile

      public StaticSourceFile getSourceFile()
    • parseInlineTypeDoc

      public @Nullable JSDocInfo parseInlineTypeDoc()
      Parse a description as a @type.
    • parseTypeString

      public static Node parseTypeString(String typeString)
      Parses a string containing a JsDoc type declaration, returning the type if the parsing succeeded or null if it failed.
    • parseJsdoc

      public static JSDocInfo parseJsdoc(String toParse)
      Parses a string containing a JsDoc declaration, returning the entire JSDocInfo if the parsing succeeded or null if it failed.
    • parseFileOverviewJsdoc

      public static JSDocInfo parseFileOverviewJsdoc(String toParse)
    • parse

      public boolean parse()
      Parses a JSDocInfo object. This parsing method reads all tokens returned by the JsDocTokenStream.getJsDocToken() method until the JsDocToken.EOC is returned.
      Returns:
      true if JSDoc information was correctly parsed, false otherwise
    • retrieveAndResetParsedJSDocInfo

      public JSDocInfo retrieveAndResetParsedJSDocInfo()