-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update lang_fe and add lang_c7 * actually add the files * fixed language_fe * add to meta_languages and bump * space * .*
- Loading branch information
1 parent
02a5929
commit d765030
Showing
3 changed files
with
119 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
-- mod-version:3 | ||
local syntax = require "core.syntax" | ||
|
||
syntax.add { | ||
name = "cel7", | ||
files = "%.c7$", | ||
comment = ";", | ||
patterns = { | ||
{ pattern = ";.*", type = "comment" }, | ||
{ pattern = { '"', '"', '\\' }, type = "string" }, | ||
{ pattern = "0x4000", type = "literal" }, | ||
{ pattern = "0x4040", type = "literal" }, | ||
{ pattern = "0x52a0", type = "literal" }, | ||
{ pattern = "0x[%da-fA-F]+", type = "number" }, | ||
{ pattern = "-?%d+[%d%.]*", type = "number" }, | ||
{ pattern = "-?%.?%d+", type = "number" }, | ||
{ pattern = "'", type = "symbol" }, | ||
{ pattern = "=", type = "symbol" }, | ||
{ pattern = "<=?", type = "symbol" }, | ||
{ pattern = "[%+-%*/]", type = "symbol" }, | ||
{ pattern = "//", type = "keyword2" }, | ||
{ pattern = "%%", type = "keyword2" }, | ||
{ pattern = "%f[^(][^()'%s\"]+", type = "function" }, | ||
{ pattern = "[^()'%s\"]+", type = "symbol" }, | ||
}, | ||
symbols = { | ||
["let"] = "keyword", | ||
["="] = "operator", | ||
["if"] = "keyword", | ||
["fn"] = "keyword", | ||
["mac"] = "keyword", | ||
["while"] = "keyword", | ||
["quote"] = "keyword", | ||
["'"] = "keyword", | ||
["and"] = "keyword", | ||
["or"] = "keyword", | ||
["do"] = "keyword", | ||
["cons"] = "keyword", | ||
["car"] = "keyword", | ||
["cdr"] = "keyword", | ||
["setcar"] = "keyword", | ||
["setcdr"] = "keyword", | ||
["list"] = "keyword", | ||
["not"] = "keyword", | ||
["is"] = "keyword", | ||
["atom"] = "keyword", | ||
["print"] = "keyword", | ||
["<"] = "operator", | ||
["<="] = "operator", | ||
["="] = "operator", | ||
["+"] = "operator", | ||
["-"] = "operator", | ||
["*"] = "operator", | ||
["/"] = "operator", | ||
["nil"] = "literal", | ||
["t"] = "literal", | ||
|
||
-- reserved variables (config) | ||
["title"] = "keyword2", | ||
["width"] = "keyword2", | ||
["height"] = "keyword2", | ||
["debug"] = "keyword2", | ||
|
||
-- callbacks | ||
["init"] = "keyword2", | ||
["step"] = "keyword2", | ||
["keydown"] = "keyword2", | ||
["keyup"] = "keyword2", | ||
|
||
-- built-in functions | ||
["quit"] = "keyword2", | ||
["rand"] = "keyword2", | ||
["poke"] = "keyword2", | ||
["peek"] = "keyword2", | ||
["color"] = "keyword2", | ||
["put"] = "keyword2", | ||
["get"] = "keyword2", | ||
["fill"] = "keyword2", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters