void declFunc(Var e) { #if DEBUG Console.WriteLine("declFunc token=[" + tok + "]\n"); #endif CommentHolder(); // start new comment e.setName(tok.getValue()); /* value is the function name */ if (e.getName().Equals("main")) { if (Io.gendll) { io.Abort("Using main entrypoint when generating a DLL"); } mainseen = true; } staticvar.add(e); /* add function name to static VarList */ paramvar = paramList(); // track current param list e.setParams(paramvar); // and set it in func var localvar = new VarList(); // track new local parameters CommentFillPreTok(); emit.FuncBegin(e); if (tok.getFirstChar() != '{') { io.Abort("Expected '{'"); } blockOuter(null, null); emit.FuncEnd(); emit.IL(); if (Io.genlist) { emit.LIST(); } emit.Finish(); }
void declFunc(Var e) { #if DEBUG Console.WriteLine("declFunc token=["+tok+"]\n"); #endif CommentHolder(); // start new comment e.setName(tok.getValue()); /* value is the function name */ if (e.getName().Equals("main")) { if (Io.gendll) io.Abort("Using main entrypoint when generating a DLL"); mainseen = true; } staticvar.add(e); /* add function name to static VarList */ paramvar = paramList(); // track current param list e.setParams(paramvar); // and set it in func var localvar = new VarList(); // track new local parameters CommentFillPreTok(); emit.FuncBegin(e); if (tok.getFirstChar() != '{') io.Abort("Expected '{'"); blockOuter(null, null); emit.FuncEnd(); emit.IL(); if (Io.genlist) emit.LIST(); emit.Finish(); }