Esempio n. 1
0
 public void CopyFrom(FunctionData other)
 {
     m_Call = other.m_Call;
     m_Statements = other.m_Statements;
     m_ExtentClass = other.m_ExtentClass;
 }
Esempio n. 2
0
 public void AddStatement(FunctionData statement)
 {
     m_Statements.Add(statement);
     if ((int)ExtentClassEnum.EXTENT_CLASS_STATEMENT != m_ExtentClass)
     {
         m_ExtentClass = (int)ExtentClassEnum.EXTENT_CLASS_STATEMENT;
     }
 }
Esempio n. 3
0
        public static void writeFunctionData(StringBuilder stream, FunctionData data, int indent, bool isLastOfStatement)
        {
            #if FULL_VERSION
            string line = "";
            if (null != data.Call)
                line = data.Call.ToScriptString();
            if (data.HaveStatement())
            {
                if (line.Length > 0)
                {
                    writeLine(stream, line, indent);
                }
                writeLine(stream, "{", indent);
                ++indent;

                int ct = data.GetStatementNum();
                for (int i = 0; i < ct; ++i)
                {
                    ISyntaxComponent tempData = data.GetStatement(i);
                    writeSyntaxComponent(stream, tempData, indent, true);
                }

                --indent;
                if (isLastOfStatement)
                    writeLine(stream, "};", indent);
                else
                    writeLine(stream, "}", indent);
            }
            else
            {
                if (isLastOfStatement)
                    writeLine(stream, line + ";", indent);
                else
                    writeLine(stream, line, indent);
            }
            #endif
        }
Esempio n. 4
0
 public void AddParams(FunctionData param)
 {
     m_Params.Add(param);
     if ((int)ParamClassEnum.PARAM_CLASS_NOTHING == m_ParamClass)
     {
         m_ParamClass = (int)ParamClassEnum.PARAM_CLASS_PARENTHESIS;
     }
 }
Esempio n. 5
0
 protected virtual void Load(FunctionData funcData)
 {
 }