示例#1
0
        public override void Visit(FuncDeclarationStmt stmt)
        {
            if (isNewLine)
            {
                isNewLine = false;
                AddStr(WS());
            }
            AddStr("func " + stmt.name.lexeme + "(");
            for (int i = 0; i < stmt.parameters.Count; i++)
            {
                AddStr(stmt.parameters[i].lexeme);

                if (i != stmt.parameters.Count - 1)
                {
                    AddStr(", ");
                }
            }

            AddStr(")");
            stmt.body.Accept(this);
        }
示例#2
0
 public virtual void Visit(FuncDeclarationStmt stmt)
 {
 }
示例#3
0
 public override void Visit(FuncDeclarationStmt stmt)
 {
 }