File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 63
63
return children ;
64
64
} ;
65
65
66
- State . prototype . finish = function ( ) {
66
+ State . prototype . finish = function ( parser ) {
67
67
if ( this . rule . postprocess ) {
68
- this . data = this . rule . postprocess ( this . data , this . reference , Parser . fail ) ;
68
+ this . data = this . rule . postprocess ( this . data , this . reference , Parser . fail , parser ) ;
69
69
}
70
70
} ;
71
71
80
80
}
81
81
82
82
83
- Column . prototype . process = function ( nextColumn ) {
83
+ Column . prototype . process = function ( parser ) {
84
84
var states = this . states ;
85
85
var wants = this . wants ;
86
86
var completed = this . completed ;
89
89
var state = states [ w ] ;
90
90
91
91
if ( state . isComplete ) {
92
- state . finish ( ) ;
92
+ state . finish ( parser ) ;
93
93
if ( state . data !== Parser . fail ) {
94
94
// complete
95
95
var wantedBy = state . wantedBy ;
269
269
column . wants [ grammar . start ] = [ ] ;
270
270
column . predict ( grammar . start ) ;
271
271
// TODO what if start rule is nullable?
272
- column . process ( ) ;
272
+ column . process ( this ) ;
273
273
this . current = 0 ; // token index
274
274
}
275
275
335
335
// To prevent duplication, we also keep track of rules we have already
336
336
// added
337
337
338
- nextColumn . process ( ) ;
338
+ nextColumn . process ( this ) ;
339
339
340
340
// If needed, throw an error:
341
341
if ( nextColumn . states . length === 0 ) {
You can’t perform that action at this time.
0 commit comments