- JSFunction(String sourceName, int firstLine, JSScope parentJSScope) {
- this.sourceName = sourceName;
- this.firstLine = firstLine;
- this.parentJSScope = parentJSScope;
- }
-
- protected JSFunction(String sourceName, int firstLine, Reader sourceCode, JSScope parentJSScope) throws IOException {
- this(sourceName, firstLine, parentJSScope);
- if (sourceCode == null) return;
- Parser p = new Parser(sourceCode, sourceName, firstLine);
- while(true) {
- int s = size;
- p.parseStatement(this, null);
- if (s == size) break;
- }
- add(-1, LITERAL, null);
- add(-1, RETURN);
- }
-