Class JsFileLineParser
- java.lang.Object
-
- com.google.javascript.jscomp.deps.JsFileLineParser
-
- Direct Known Subclasses:
DepsFileRegexParser
,JsFileRegexParser
@GwtIncompatible("java.io") public abstract class JsFileLineParser extends java.lang.Object
Base class for classes that parse JavaScript sources on a line-by-line basis. Strips comments from files and records all parsing errors.
-
-
Field Summary
Fields Modifier and Type Field Description static DiagnosticType
PARSE_ERROR
-
Constructor Summary
Constructors Constructor Description JsFileLineParser(ErrorManager errorManager)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
didParseSucceed()
void
setShortcutMode(boolean mode)
In shortcut mode, the file line parser can stop reading early if it thinks it found enough information.
-
-
-
Field Detail
-
PARSE_ERROR
public static final DiagnosticType PARSE_ERROR
-
-
Constructor Detail
-
JsFileLineParser
public JsFileLineParser(ErrorManager errorManager)
Constructor.- Parameters:
errorManager
- Parse error handler.
-
-
Method Detail
-
setShortcutMode
public void setShortcutMode(boolean mode)
In shortcut mode, the file line parser can stop reading early if it thinks it found enough information. For example, many parsers assume that dependency information never shows up after "real" code.
-
didParseSucceed
public boolean didParseSucceed()
-
-