mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-30 23:23:07 +00:00 
			
		
		
		
	Update tm_language_gen.
This commit is contained in:
		| @@ -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) `\-` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose