Add Node.js globals, quasi-keywords and export highlighting

This commit is contained in:
Rebecca Turner 2014-08-29 16:50:14 -04:00
parent 585f123837
commit a7db2eb736
1 changed files with 20 additions and 0 deletions

20
js.jsf
View File

@ -13,6 +13,7 @@
=Type bold =Type bold
=Keyword bold =Keyword bold
=Global bold =Global bold
=Exports bold black
=Operator bold =Operator bold
=Bad inverse bold red =Bad inverse bold red
=Brace magenta =Brace magenta
@ -300,6 +301,22 @@
"with" kw "with" kw
# quasi-keywords # quasi-keywords
"prototype" kw "prototype" kw
# Node.js
"module" global
"exports" export
"process" global
"global" global
"console" global
"setTimeout" global
"setInterval" global
"clearInterval" global
"Buffer" type
# Node.js globals that we'll pretend are keywords
"require" kw
"__filename" kw
"__dirname" kw
# By convention...
"self" kw
done done
"a-zA-Z0-9_" ident "a-zA-Z0-9_" ident
@ -312,6 +329,9 @@ done
:global Global :global Global
* idle noeat * idle noeat
:export Exports
* idle noeat
:lit Constant :lit Constant
* after_term noeat * after_term noeat