From a7db2eb736bf35198b1336db38550277811a753a Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 29 Aug 2014 16:50:14 -0400 Subject: [PATCH] Add Node.js globals, quasi-keywords and export highlighting --- js.jsf | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/js.jsf b/js.jsf index 9101bab..b5ea595 100644 --- a/js.jsf +++ b/js.jsf @@ -13,6 +13,7 @@ =Type bold =Keyword bold =Global bold +=Exports bold black =Operator bold =Bad inverse bold red =Brace magenta @@ -300,6 +301,22 @@ "with" kw # quasi-keywords "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 "a-zA-Z0-9_" ident @@ -312,6 +329,9 @@ done :global Global * idle noeat +:export Exports + * idle noeat + :lit Constant * after_term noeat