Example #1
0
 void FunctionReturnDefinition(Scope scope, out IExpression expr, MultiVariableDeclaration parmDecl)
 {
     MultiVariableDeclaration retDecl;
     Scope funcScope = new Scope(scope);
     StatementList stmts = new StatementList();
     Expect(8);
     VariableDeclaration.Scopify(ref funcScope, parmDecl.Declarations);
     VarNomination(ref funcScope, out retDecl, true);
     Expect(15);
     while (StartOf(2)) {
         Statement(ref funcScope, stmts);
     }
     Expect(16);
     expr = new FunctionLiteral(retDecl, parmDecl, stmts);
 }
Example #2
0
 public BoundFunctionLiteral(FunctionLiteral prototype, Scope scopeAtPrototype)
 {
     this.prototype = prototype;
     this.scopeAtPrototype = scopeAtPrototype;
 }