Skip to content

Commit 7633749

Browse files
committed
added "program" plugin to Parser for custom stuff
1 parent c7c9239 commit 7633749

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Parser.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,8 @@ Parser.prototype.parse = function parse(source, initialState) {
698698
definitions: []
699699
};
700700
var state = this.state = initialState || {};
701-
this.walkStatements(ast.body);
701+
if(this.applyPluginsBailResult("program", ast) === undefined)
702+
this.walkStatements(ast.body);
702703
this.scope = oldScope;
703704
this.state = oldState;
704705
return state;

0 commit comments

Comments
 (0)