-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathprepare.sh
More file actions
16 lines (12 loc) · 818 Bytes
/
prepare.sh
File metadata and controls
16 lines (12 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/user/bin/env bash
set -e
# we only need lezer-generator to generate parser.terms.ts
npx lezer-generator --typeScript codemirror-lang-orgmode/src/orgmode.grammar -o codemirror-lang-orgmode/src/parser >/dev/null
rm codemirror-lang-orgmode/src/parser.ts # generated by lezer-generator but we don't know the external tokenizers at this point
echo Wrote codemirror-lang-orgmode/src/parser.terms.ts
# here we generate the grammar without linking any external tokenizers
bash codemirror-lang-orgmode/generate_grammar.sh > codemirror-lang-orgmode/src/generated_grammar.ts
echo Wrote codemirror-lang-orgmode/src/generated_grammar.ts
# we also generate the grammar for orgzly search
bash generate_boolean_expression_grammar.sh > boolean_expression_generated_grammar.ts
echo Wrote boolean_expression_generated_grammar.ts