internal void buildSecondTernaryOperator() { int type; string name = pop(out type); StatementData statement = getCurStatement(); FunctionData newFunc = new FunctionData(); CallData call = new CallData(); ValueData nname = new ValueData(); call.Name = nname; newFunc.Call = call; statement.Functions.Add(newFunc); FunctionData func = getLastFunction(); if (!func.IsValid()) { func.Call.SetParamClass((int)CallData.ParamClassEnum.PARAM_CLASS_TERNARY_OPERATOR); func.SetExtentClass((int)FunctionData.ExtentClassEnum.EXTENT_CLASS_STATEMENT); func.Call.Name.SetId(name); func.Call.Name.SetType(type); func.Call.Name.SetLine(getLastLineNumber()); } }
internal void buildFirstTernaryOperator() { int type; string name = pop(out type); StatementData arg = popStatement(); StatementData _statement = newStatement(); FunctionData first = _statement.First; first.Call.Name.SetLine(getLastLineNumber()); _statement.CopyFirstComments(arg); arg.FirstComments.Clear(); mStatementSemanticStack.Push(_statement); StatementData statement = getCurStatement(); FunctionData func = getLastFunction(); if (!func.IsValid()) { func.Call.SetParamClass((int)CallData.ParamClassEnum.PARAM_CLASS_TERNARY_OPERATOR); func.SetExtentClass((int)FunctionData.ExtentClassEnum.EXTENT_CLASS_STATEMENT); func.Call.Name.SetId(name); func.Call.Name.SetType(type); if (arg.IsValid()) { func.Call.AddParams(arg); } } }
internal void markHaveExternScript() { FunctionData func = getLastFunction(); bool commentOnNewLine; IList <string> cmts = GetComments(out commentOnNewLine); if (cmts.Count > 0) { func.Call.Comments.AddRange(cmts); } func.SetExtentClass((int)FunctionData.ExtentClassEnum.EXTENT_CLASS_EXTERN_SCRIPT); }
internal void markHaveStatement() { FunctionData func = getLastFunction(); func.SetExtentClass((int)FunctionData.ExtentClassEnum.EXTENT_CLASS_STATEMENT); }
internal void markHaveExternScript() { FunctionData func = getLastFunction(); func.SetExtentClass((int)FunctionData.ExtentClassEnum.EXTENT_CLASS_EXTERN_SCRIPT); }