Exemplo n.º 1
0
        private DialogueChoiceExpression Consume_ChoiceExpression()
        {
            Token       token     = currentToken;
            IExpression condition = new TRUE_Expression();;

            Consume(TokenType.CHOICE_MEMBER);
            Consume(TokenType.ASSIGN);

            IExpression text = Consume_Factor();

            Consume(TokenType.TRANSFER);

            IExpression next = null;

            if (currentToken.Type == TokenType.END)
            {
                next = Consume_TerminationExpression();
            }
            else
            {
                next = Consume_Factor();
            }

            return(ExpressionFactory.CreateChoiceMemberExpression(condition, text, next, token));
        }