| java.lang.Object org.mozilla.javascript.TokenStream
TokenStream | public class TokenStream (Code) | | 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: org.mozilla.javascript.Parser author: Mike McCabe author: Brendan Eich |
Constructor Summary | |
public | TokenStream(Parser parser, LexerInput lexerInput, Reader sourceReader, String sourceString, int lineno) Construct a tokenstream suitable for syntax highlighting lexing (returns
space and comment tokens, uses a LexerInput, etc. | | TokenStream(Parser parser, Reader sourceReader, String sourceString, int lineno) |
TokenStream | public TokenStream(Parser parser, LexerInput lexerInput, Reader sourceReader, String sourceString, int lineno)(Code) | | Construct a tokenstream suitable for syntax highlighting lexing (returns
space and comment tokens, uses a LexerInput, etc.
|
eof | final public boolean eof()(Code) | | |
fromState | public void fromState(Object object)(Code) | | Restore state from the given Object which was earlier created via
toState
|
getBufferOffset | final public int getBufferOffset()(Code) | | |
getLineno | final public int getLineno()(Code) | | |
getNumber | final public double getNumber()(Code) | | |
getOffset | final int getOffset()(Code) | | |
isDigit | static boolean isDigit(int c)(Code) | | |
isJSSpace | static boolean isJSSpace(int c)(Code) | | |
isXMLAttribute | boolean isXMLAttribute()(Code) | | |
readRegExp | public void readRegExp(int startToken) throws IOException(Code) | | Parser calls the method when it gets / or /= in literal context.
|
seenSpaces | public int seenSpaces()(Code) | | |
setInput | public void setInput(LexerInput lexerInput)(Code) | | |
setSyntaxLexing | public void setSyntaxLexing(boolean syntaxLexing)(Code) | | Set whether comment tokens should be included as return values
from getToken() or not. In parsing mode, it should not. But when
doing lexical analysis as part of syntax highlighting for example,
it should.
|
toState | public Object toState()(Code) | | Record all state that needs to be restored to resume lexing from the same input position
|
|
|