Пример #1
0
        public object visitFunctionStmt(Stmt.Function stmt)
        {
            Function function = new Function(stmt);

            environment.define(stmt.name.lexeme, function);
            environment.define(stmt.name.lexeme, function);
            return(null);
        }
Пример #2
0
 public Function(Stmt.Function declaration)
 {
     arity            = declaration.parameters.Count();
     this.declaration = declaration;
 }