File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -429,7 +429,6 @@ func NotPredicate(parser ParserFunc) ParserFunc {
429429
430430 return Ast {
431431 TypeData : "not_predicate" ,
432- Children : []Ast {},
433432 StartPosition : state .Position ,
434433 EndPosition : state .Position ,
435434 }, true
@@ -442,7 +441,6 @@ func EndOfFile() ParserFunc {
442441 state .LastExpectations = []Expectation {}
443442 return Ast {
444443 TypeData : "end_of_file" ,
445- Children : []Ast {},
446444 StartPosition : state .Position ,
447445 EndPosition : state .Position ,
448446 }, false
Original file line number Diff line number Diff line change @@ -134,23 +134,23 @@ func visitParsingRule(node *NodeVisit) rd.ParserFunc {
134134 var ruleName = node .Node .Children [0 ].Match
135135
136136 var parser = func (state * rd.State ) (rd.Ast , bool ) {
137- var start = state .Position
137+ // var start = state.Position
138138 var ast , err = rule (state )
139139
140- if ! err {
141- ast .Rule = ruleName
142- state .SuccesfullRules = append (state .SuccesfullRules , rd.Ast {
143- Rule : ast .Rule ,
144- Match : ast .Match ,
145- StartPosition : ast .StartPosition ,
146- EndPosition : ast .EndPosition ,
147- })
148- } else {
149- state .FailedRules = append (state .FailedRules , rd.Ast {
150- Rule : ruleName ,
151- StartPosition : start ,
152- })
153- }
140+ // if !err {
141+ // ast.Rule = ruleName
142+ // state.SuccesfullRules = append(state.SuccesfullRules, rd.Ast{
143+ // Rule: ast.Rule,
144+ // Match: ast.Match,
145+ // StartPosition: ast.StartPosition,
146+ // EndPosition: ast.EndPosition,
147+ // })
148+ // } else {
149+ // state.FailedRules = append(state.FailedRules, rd.Ast{
150+ // Rule: ruleName,
151+ // StartPosition: start,
152+ // })
153+ // }
154154
155155 return ast , err
156156 }
You can’t perform that action at this time.
0 commit comments