//----------------------------------------
        // Получение аргументов функции
        //----------------------------------------
        private int get_args_count(object name)
        {
            var args = get_args();

            //проверяем какие параметры надо оставить в виде выражений
            int bitsValue = 0;

            if (ParametersList.Contains(name))
            {
                bitsValue = (int)ParametersList[name];
            }
            int bitsCounter = 1;

            foreach (var arg in args)
            {
                if ((bitsValue & bitsCounter) > 0)
                {
                    asmList.Add(new StiAsmCommand(StiAsmCommandType.PushValue, arg));
                }
                else
                {
                    asmList.AddRange(arg);
                }
                bitsCounter = bitsCounter << 1;
            }

            return(args.Count);
        }
 void GetUniqueParameters()
 {
     foreach (SetupData setupData in setupDataList)
     {
         if (!ParametersList.Contains(setupData.Parameter))
         {
             ParametersList.Add(setupData.Parameter);
         }
     }
     ParametersList.Sort();
 }
Beispiel #3
0
 private void SetWordsTypes()
 {
     foreach (Word word in Words)
     {
         if (FunctionsList.Contains(word.WordInText))
         {
             word.SetType(WordType.Function);
         }
         if (ParametersList.Contains(word.WordInText))
         {
             word.SetType(WordType.Parameter);
         }
         if (OutptutParametersList.Contains(word.WordInText))
         {
             word.SetType(WordType.OutputParameter);
         }
         if (word.WordInText.Equals(OPEN_SQUARE_BRACKET))
         {
             word.SetType(WordType.OpenSquareBracket);
         }
         if (word.WordInText.Equals(CLOSE_SQUARE_BRACKET))
         {
             word.SetType(WordType.CloseSquareBracket);
         }
         if (word.WordInText.Equals(OPEN_PARENTHESIS))
         {
             word.SetType(WordType.OpenParenthesis);
         }
         if (word.WordInText.Equals(CLOSE_PARENTHESIS))
         {
             word.SetType(WordType.CloseParenthesis);
         }
         if (SymbolsList.Contains(word.WordInText))
         {
             word.SetType(WordType.Symbol);
         }
     }
 }