Ejemplo n.º 1
0
        private AstItem ReadVariableAssignment(TokenIterator tokens)
        {
            var name = tokens.PopExpected(TokenKind.Word);

            tokens.PopExpected(TokenKind.AssigmnentOperator);

            var expression = ReadExpression(tokens, TokenKind.SemiColon);

            tokens.PopExpected(TokenKind.SemiColon);

            return(AstItem.VariableAssignment(name.Value, expression));
        }