]> git.lizzy.rs Git - micro.git/commitdiff
Update coffeescript.yaml (#1571)
authorSome person <48339289+gsbhasin123@users.noreply.github.com>
Thu, 23 Apr 2020 03:12:56 +0000 (20:12 -0700)
committerGitHub <noreply@github.com>
Thu, 23 Apr 2020 03:12:56 +0000 (23:12 -0400)
* Update coffeescript.yaml

We need much much more modern coffeescript standards, the current one has broken `0x123456` (hex) and single quotes, and doesn't support multiline comments. This PR aims to fix that. I'm no regexp expert, I just based this off JS', so tell me if I did anything wrong.

* Update coffeescript.yaml

runtime/syntax/coffeescript.yaml

index d9b374836df37c46ce3d53264eb35fe6cf46a847..b6bd539068a7a802b879fe3e584a92fabacc52bb 100644 (file)
@@ -12,6 +12,9 @@ rules:
     - statement:  "\\b(debugger|switch|while|do|class|extends|super)\\b"
     - statement:  "\\b(undefined|then|unless|until|loop|of|by|when)\\b"
     - constant.bool:  "\\b(true|false|yes|no|on|off)\\b"
+    - constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
+    - constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
+    - constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
     - identifier: "@[A-Za-z0-9_]*"
 
     - constant.string:
@@ -20,10 +23,23 @@ rules:
         skip: "\\\\."
         rules:
             - constant.specialChar: "\\\\."
+     
+    - constant.string:
+        start: "'"
+        end: "'"
+        skip: "\\\\."
+        rules:
+            - constant.specialChar: "\\\\."
+      
 
     - comment:
         start: "#"
         end: "$"
         rules:
             - todo: "(TODO|XXX|FIXME):?"
+    - comment:
+        start: "###"
+        end: "###"
+        rules:  
+            - todo: "(TODO|XXX|FIXME)"