public DirectFunctionCall(String functionType, Token token)
     : base()
 {
     parameters = new String[2]{ functionType, token.getValue() };
     this.variable = new Variable(token);
     this.functionType = functionType;
     this.value = token.getValue();
 }
 public TokenExpectation(int level, Token.Type tokenType)
 {
     Level = level;
     TokenType = tokenType;
 }
 public Variable(Token t)
 {
     tokenType = t.tokentype;
     value = t.getValue();
 }
        public void tokenize(String codeLine, int lineNumber)
        {
            Boolean hasSemicolon = false;
            int linePosition = 0;
            String[] codeWords = codeLine.Split(' ');
            foreach (String word in codeWords)
            {
                String newWord = word;
                if (!word.Equals(""))
                {
                    if (word.EndsWith(";"))
                    {
                        newWord = Regex.Replace(word, @";", "");
                        hasSemicolon = true;
                    }
                    linePosition++;
                    if (newWord.Equals("}") || newWord.Equals(")") || newWord.Equals("]"))
                        this.currentLevel--;

                    newWord = Regex.Replace(newWord, @"\t|\n|\r", "");
                    Token token = new Token(this.currentPosition, lineNumber, linePosition, newWord, this.currentLevel);
                    this.tokens.Add(token);

                    if(hasSemicolon){
                        Token semicolon = new Token(this.currentPosition, lineNumber, linePosition, ";", this.currentLevel);
                        this.tokens.Add(semicolon);
                    }

                    if (newWord.Equals("{") || newWord.Equals("(") || newWord.Equals("["))
                        this.currentLevel++;
                }
            }
        }