Class JsFunctionParser

java.lang.Object
com.google.javascript.jscomp.deps.JsFileLineParser
com.google.javascript.jscomp.deps.JsFunctionParser

public class JsFunctionParser extends JsFileLineParser
A parser that can extract dependency information from a .js file.
  • Constructor Details

    • JsFunctionParser

      public JsFunctionParser(Collection<String> functions, ErrorManager errorManager)
      Constructor
      Parameters:
      functions - Functions to parse.
      errorManager - Handles parse errors.
  • Method Details

    • parseFile

      public Collection<JsFunctionParser.SymbolInfo> parseFile(String filePath, String fileContents)
      Parses the given file and returns the dependency information that it contained.
      Parameters:
      filePath - Path to the file to parse.
      fileContents - The contents to parse.
      Returns:
      A collection containing all symbols found in the file.
    • parseLine

      protected boolean parseLine(String line) throws com.google.javascript.jscomp.deps.JsFileLineParser.ParseException
      Parses a line of JavaScript, extracting dependency information.
      Throws:
      com.google.javascript.jscomp.deps.JsFileLineParser.ParseException