private void typeTest()
        {
            isOperator();
            var statementParser = new StatementsParser();

            symbol = statementParser.ParseType(symbol);
        }
Пример #2
0
 private void finalConstVarOrType()
 {
     if (symbol.Token == Token.TokenKeywordFinal || symbol.Token == Token.TokenKeywordConst)
     {
         readNextSymbol();
         var statementParser = new StatementsParser();
         symbol = statementParser.ParseType(symbol);
     }
     else if (symbol.Token == Token.TokenKeywordVar)
     {
         readNextSymbol();
     }
     else
     {
         statementsParser = new StatementsParser();
         symbol           = statementsParser.ParseType(symbol);
     }
 }
Пример #3
0
 private void block()
 {
     if (symbol.Token == Token.TokenOpenCBrackets)
     {
         readNextSymbol();
     }
     else
     {
         error("Esperava um '{'");
     }
     statementsParser = new StatementsParser();
     symbol           = statementsParser.ParseStatements(symbol);
     if (symbol.Token == Token.TokenCloseCBrackets)
     {
         readNextSymbol();
         return;
     }
     error("Esperava um '}'");
 }
        private void newExpression()
        {
            readNextSymbol();
            var statementParser = new StatementsParser();

            symbol = statementParser.ParseType(symbol);
            if (symbol.Token == Token.TokenDot)
            {
                readNextSymbol();
                if (symbol.Token == Token.TokenID)
                {
                    readNextSymbol();
                }
                else
                {
                    error("Esperava um identificador");
                }
            }
            arguments();
        }