com.google.javascript.rhino
Class TokenStream
java.lang.Object
com.google.javascript.rhino.TokenStream
public class TokenStream
- extends Object
This class implements the JavaScript scanner.
It is based on the C source files jsscan.c and jsscan.h
in the jsref package.
- See Also:
Parser
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenStream
public TokenStream(Parser parser,
Reader sourceReader,
String sourceString,
int lineno)
isKeyword
public static boolean isKeyword(String s)
isJSIdentifier
public static boolean isJSIdentifier(String s)
getLineno
protected final int getLineno()
getCharno
protected final int getCharno()
getToken
public final int getToken()
throws IOException
- Throws:
IOException
getTokenno
public int getTokenno()
ungetChar
protected void ungetChar(int c)
getChar
protected int getChar()
throws IOException
- Throws:
IOException
setFileLevelJsDocBuilder
public void setFileLevelJsDocBuilder(Node.FileLevelJsDocBuilder fileLevelJsDocBuilder)
- Set the FileLevelJsDocBuilder on the TokenStream. The TokenStream passes
the builder on to the JSDocInfoParser if it exists. Otherwise this method
is a no-op.
- Parameters:
fileLevelJsDocBuilder
-