org.mozilla.javascript
Class Parser
java.lang.Object
org.mozilla.javascript.Parser
public class Parser
- extends java.lang.Object
This class implements the JavaScript parser.
It is based on the C source files jsparse.c and jsparse.h
in the jsref package.
- Author:
- Mike McCabe, Brendan Eich
- See Also:
TokenStream
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parser
public Parser(CompilerEnvirons compilerEnv,
ErrorReporter errorReporter)
getCurrentLineNumber
public int getCurrentLineNumber()
createDecompiler
protected Decompiler createDecompiler(CompilerEnvirons compilerEnv)
getEncodedSource
public java.lang.String getEncodedSource()
eof
public boolean eof()
parse
public ScriptOrFnNode parse(java.lang.String sourceString,
java.lang.String sourceURI,
int lineno)
parse
public ScriptOrFnNode parse(java.io.Reader sourceReader,
java.lang.String sourceURI,
int lineno)
throws java.io.IOException
- Throws:
java.io.IOException