MyC.Var.setName C# (CSharp) Method

setName() public method

public setName ( String s ) : void
s String
return void
  public void setName(String s) { name = s; }
  public VarList getParams() { return methodparams; }

Usage Example

コード例 #1
0
        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();
        }
All Usage Examples Of MyC.Var::setName