Class Scanner
java.lang.Object
com.google.javascript.jscomp.parsing.parser.Scanner
Scans javascript source code into tokens. All entrypoints assume the caller is not expecting a
regular expression literal except for nextRegularExpressionLiteralToken.
7 Lexical Conventions
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionScanner
(ErrorReporter errorReporter, Scanner.CommentRecorder commentRecorder, SourceFile file, int offset) -
Method Summary
Modifier and TypeMethodDescriptiongetFile()
int
peekToken
(int index) void
setPosition
(SourcePosition position)
-
Constructor Details
-
Scanner
public Scanner(ErrorReporter errorReporter, Scanner.CommentRecorder commentRecorder, SourceFile file, int offset)
-
-
Method Details
-
getFile
-
getOffset
public int getOffset() -
setPosition
-
getPosition
-
nextToken
-
nextRegularExpressionLiteralToken
-
nextTemplateLiteralToken
-
peekToken
-
peekToken
-