]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/javascript.yaml
Merge pull request #613 from GeigerCounter/build_tools
[micro.git] / runtime / syntax / javascript.yaml
index 06eda6edebb631d59fe1df0e5aec64cdef793a76..e51c5ff7d2e512f2b5d6864710dba29295d072cf 100644 (file)
@@ -1,7 +1,8 @@
 filetype: javascript
 
 detect:
-    filename: "\\.js$"
+    filename: "(\\.js$|\\.es[5678]?$)"
+    header: "^#!.*/(env +)?node( |$)"
 
 rules:
     - constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
@@ -15,7 +16,7 @@ rules:
     - symbol.brackets: "(\\(|\\))"
     - symbol.brackets: "(\\[|\\])"
     - statement: "\\b(break|case|catch|continue|default|delete|do|else|finally)\\b"
-    - statement: "\\b(for|function|class|extends|get|if|in|instanceof|new|return|set|switch)\\b"
+    - statement: "\\b(for|function|class|extends|get|if|in|instanceof|new|return|set|switch|async|await)\\b"
     - statement: "\\b(switch|this|throw|try|typeof|var|const|let|void|while|with)\\b"
     - constant: "\\b(null|undefined|NaN)\\b"
     - constant: "\\b(true|false)\\b"