mirror of
https://github.com/janet-lang/janet
synced 2025-01-12 16:40:27 +00:00
Update tm_language_gen.
This commit is contained in:
parent
cc1ff9125a
commit
b082c8123e
@ -2,6 +2,25 @@
|
||||
# Used to help build the tmLanguage grammar. Emits
|
||||
# the entire .tmLanguage file for janet.
|
||||
|
||||
# Use dynamic binding and make this the first
|
||||
# expression in the file to not pollute (all-bindings)
|
||||
(setdyn :allsyms
|
||||
(array/concat
|
||||
@["break"
|
||||
"def"
|
||||
"do"
|
||||
"var"
|
||||
"set"
|
||||
"fn"
|
||||
"while"
|
||||
"if"
|
||||
"quote"
|
||||
"quasiquote"
|
||||
"unquote"
|
||||
"splice"]
|
||||
(all-bindings)))
|
||||
(def allsyms (dyn :allsyms))
|
||||
|
||||
(def grammar-template
|
||||
`````
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
@ -343,22 +362,6 @@
|
||||
|
||||
# Now we generate the bindings in the language.
|
||||
|
||||
(def- specials
|
||||
@["break"
|
||||
"def"
|
||||
"do"
|
||||
"var"
|
||||
"set"
|
||||
"fn"
|
||||
"while"
|
||||
"if"
|
||||
"quote"
|
||||
"quasiquote"
|
||||
"unquote"
|
||||
"splice"])
|
||||
|
||||
(def allsyms (array/concat @[] specials (all-bindings)))
|
||||
|
||||
(def- escapes
|
||||
{(get "|" 0) `\|`
|
||||
(get "-" 0) `\-`
|
||||
|
Loading…
Reference in New Issue
Block a user