コード例 #1
0
        public override string ToCode()
        {
            FnBody.Deep = 3;
            StringBuilder buf = new StringBuilder();

            buf.AppendLine();
            buf.Append("过程:");
            buf.Append(FnName.ToCode());
            buf.AppendLine(FnBody.ToCode());
            return(buf.ToString());
        }
コード例 #2
0
        public bool CompileName(ClassAST classAst, int index, bool isStatic)
        {
            this.ClassAST             = classAst;
            this.ClassContext         = classAst.ClassContext;
            this.ClassName            = classAst.ClassName;
            MethodContext             = new MethodContext(this.ClassContext, FnName.ToCode());
            MethodContext.MethodIndex = index;
            bool b = FnName.Analy(this, isStatic);

            if (b)
            {
                GenerateName(isStatic);
            }
            else
            {
                return(false);
            }
            return(true);
        }