Skip to content

Commit 5b1dd2d

Browse files
fix global leak of parse_return
1 parent a30efcb commit 5b1dd2d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@ function parser() {
104104

105105
var parse_struct
106106
, parse_precision
107+
, parse_quantifier
107108
, parse_forloop
108109
, parse_if
110+
, parse_return
109111
, parse_whileloop
112+
, parse_dowhileloop
110113
, parse_function
111114
, parse_function_args
112-
, parse_dowhileloop
113-
, parse_quantifier
114-
115-
setup_stative_parsers()
116115

117116
var stream = through(write, end)
118117
, check = arguments.length ? [].slice.call(arguments) : []
@@ -125,7 +124,6 @@ function parser() {
125124
, token
126125
, node
127126

128-
129127
// setup state
130128
state.shift = special_shift
131129
state.unshift = special_unshift
@@ -138,6 +136,8 @@ function parser() {
138136
return n
139137
}
140138

139+
setup_stative_parsers()
140+
141141
// setup root node
142142
node = stmtlist()
143143
node.expecting = '(eof)'

0 commit comments

Comments
 (0)