Beispiel #1
0
        public Node ReturnStatement()
        {
            var result = new ReturnStatement()
            {
                AnchorToken = Expect(TokenCategory.RETURN)
            };

            if (firstOfExpression.Contains(CurrentToken))
            {
                result.Add(Expression());
            }
            Expect(TokenCategory.SEMICOLON);

            return(result);
        }