Skip to content

Commit 1f6d5d2

Browse files
committed
table key syntax for scintillua
1 parent aa85c46 commit 1f6d5d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

extra/scintillua/lexers/moonscript.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,16 @@ local self_var = token("self_ref", "@" * l.word + "self")
6666

6767
local proper_ident = token("proper_ident", R("AZ") * l.word)
6868

69+
local tbl_key = token("tbl_key", l.word * ":" + ":" * l.word )
70+
6971
_rules = {
7072
{ 'whitespace', ws },
7173
{ 'error', err },
7274
{ 'self', self_var },
7375
{ 'special', special },
7476
{ 'keyword', keyword },
7577
{ 'builtin', builtin },
76-
{ 'identifier', proper_ident + identifier },
78+
{ 'identifier', proper_ident + tbl_key + identifier },
7779
{ 'comment', comment },
7880
{ 'number', number },
7981
{ 'string', string },
@@ -92,6 +94,7 @@ _tokenstyles = {
9294
{ 'fndef', style_fndef },
9395
{ 'symbol', style_fndef },
9496
{ 'special', style_special },
97+
{ 'tbl_key', { fore = l.colors.red } },
9598
{ l.OPERATOR, { fore = l.colors.red, bold = true } },
9699
{ l.FUNCTION, { fore = l.colors.orange } },
97100
}

0 commit comments

Comments
 (0)