コード例 #1
0
        public static Logic parseIntoFunctionCall(string word, int lineNumber, Scope currentScope)
        {
            string funcName = getFunctionName(word, lineNumber);
            string funcPara = getFunctionInParameter(word, lineNumber);

            return(new FunctionCall(word, funcName, PackageUnWrapper.removeSurrondingParanteser(funcPara), null));
        }
コード例 #2
0
 public static void linkFunctionCall(FunctionCall theFunc, int lineNumber, Compiler.Scope currentScope)
 {
     Compiler.Function searchedFunc = currentScope.scopeFunctions.getSavedFunction(theFunc.name, lineNumber);
     if (searchedFunc != null)
     {
         Compiler.Variable[] inputVariables = validParameters(PackageUnWrapper.removeSurrondingParanteser(theFunc.parameter), searchedFunc, lineNumber, currentScope);
         theFunc.targetFunc = searchedFunc;
     }
 }
コード例 #3
0
        public static Logic[] determineLogicFromWords(string[] words, int lineNumber, Scope currentScope)
        {
            Logic[] logicOrder = new Logic[words.Length];

            for (int i = 0; i < words.Length; i++)
            {
                logicOrder [i] = getCurrentLogic(words [i], lineNumber, currentScope);
                if (logicOrder [i].currentType == WordTypes.package)
                {
                    PackageUnWrapper.unpackPackage(words [i], lineNumber, currentScope, logicOrder [i] as Package);
                }
            }

            logicOrder = PostLogicParsing.parsePostLogics(logicOrder, lineNumber, currentScope);

            return(logicOrder);
        }