Package com.google.turbine.parse
Class StreamLexer
- java.lang.Object
-
- com.google.turbine.parse.StreamLexer
-
- All Implemented Interfaces:
Lexer
public class StreamLexer extends java.lang.Object implements Lexer
ALexerthat streams input from aUnicodeEscapePreprocessor.
-
-
Constructor Summary
Constructors Constructor Description StreamLexer(UnicodeEscapePreprocessor reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.Stringjavadoc()Returns a saved javadoc comment.Tokennext()Returns the next token in the input stream, orEOF.intposition()Returns the current position in the input.SourceFilesource()Returns the source file for diagnostics.java.lang.StringstringValue()Returns the string value of the current literal or identifier token.
-
-
-
Constructor Detail
-
StreamLexer
public StreamLexer(UnicodeEscapePreprocessor reader)
-
-
Method Detail
-
javadoc
public @Nullable java.lang.String javadoc()
Description copied from interface:LexerReturns a saved javadoc comment.
-
stringValue
public java.lang.String stringValue()
Description copied from interface:LexerReturns the string value of the current literal or identifier token.- Specified by:
stringValuein interfaceLexer
-
position
public int position()
Description copied from interface:LexerReturns the current position in the input.
-
source
public SourceFile source()
Description copied from interface:LexerReturns the source file for diagnostics.
-
-