Beispiel #1
0
        //this method has the structure for an expression with brackets List
        public void auxiliarMethod(Node result)
        {
            var ListIndex = new ListIndex();

            ListIndex.AnchorToken = Expect(TokenCategory.BRACKET_OPEN);
            ListIndex.Add(Expression());
            result.Add(ListIndex);
            Expect(TokenCategory.BRACKET_CLOSE);
        }
Beispiel #2
0
        public Node ListAssignmentS()
        {
            var result = new ListAssignmentS();

            Expect(TokenCategory.BRACKET_OPEN);
            var list = new ListIndex();

            list.Add(Expression());
            result.Add(list);
            Expect(TokenCategory.BRACKET_CLOSE);

            Expect(TokenCategory.ASSIGN);
            result.Add(Expression());
            Expect(TokenCategory.SEMICOLON);
            return(result);
        }