Moved parser into main source folders
This commit is contained in:
8
app/imports/parser/parser.js
Normal file
8
app/imports/parser/parser.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import grammar from '/imports/parser/grammar.js';
|
||||
import nearley from 'nearley';
|
||||
|
||||
const nearleyGrammar = nearley.Grammar.fromCompiled(grammar);
|
||||
|
||||
export default function parser(){
|
||||
return new nearley.Parser(nearleyGrammar);
|
||||
}
|
||||
Reference in New Issue
Block a user