]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/pascal.yaml
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / syntax / pascal.yaml
index ff762ba1b9244979c5d5c49f733e0503dda6928f..cb6788126659190895141189a489d50b7ba5d6cd 100644 (file)
@@ -1,6 +1,6 @@
 filetype: pascal
 
-detect: 
+detect:
     filename: "\\.pas$"
 
 rules:
@@ -13,21 +13,31 @@ rules:
         start: "asm"
         end: "end"
         rules: []
-
-    - constant.number: "\\$[0-9A-Fa-f]+|\\b[+\\-]?[0-9]+([.]?[0-9]+)?(?i:e[+\\-]?[0-9]+)?"
-    - constant.string: "#[0-9]{1,}"
-    - constant.string: "'(?:[^']+|'')*'"
+    - constant.number: "\\$[0-9A-Fa-f]+"
+    - constant.number: "\\b[+-]?[0-9]+([.]?[0-9]+)?(?i:e[+-]?[0-9]+)?"
+    - constant.string:
+        start: "#[0-9]{1,}"
+        end: "$"
+        rules: 
+            - constant.specialChar: "\\\\."
+    - constant.string:
+        start: "'"
+        end: "'"
+        skip: "\\\\."
+        rules:
+            - constant.specialChar: "\\\\."
     - preproc:
         start: "{\\$"
         end: "}"
         rules: []
-
-    - comment: "//.*"
+    - comment:
+        start: "//"
+        end: "$"
+        rules: []
     - comment:
         start: "\\(\\*"
         end: "\\*\\)"
         rules: []
-
     - comment:
         start: "({)(?:[^$])"
         end: "}"