/* * Build a parse tree from the given sourceString. * * @return an Object representing the parsed * program. If the parse fails, null will be returned. (The * parse failure will result in a call to the ErrorReporter from * CompilerEnvirons.) */ public ScriptOrFnNode Parse (System.IO.StreamReader sourceReader, string sourceURI, int lineno) { this.sourceURI = sourceURI; this.ts = new TokenStream (this, sourceReader, null, lineno); return Parse (); }
/* * Build a parse tree from the given sourceString. * * @return an Object representing the parsed * program. If the parse fails, null will be returned. (The * parse failure will result in a call to the ErrorReporter from * CompilerEnvirons.) */ public ScriptOrFnNode Parse (string sourceString, string sourceURI, int lineno) { this.sourceURI = sourceURI; this.ts = new TokenStream (this, null, sourceString, lineno); try { return Parse (); } catch (System.IO.IOException) { // Should never happen throw new ApplicationException (); } }