about summary refs log tree commit diff stats
path: root/pkgs/by-name/tr/tree-sitter-yts/src/grammar.json
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/tr/tree-sitter-yts/src/grammar.json')
-rw-r--r--pkgs/by-name/tr/tree-sitter-yts/src/grammar.json76
1 files changed, 62 insertions, 14 deletions
diff --git a/pkgs/by-name/tr/tree-sitter-yts/src/grammar.json b/pkgs/by-name/tr/tree-sitter-yts/src/grammar.json
index a35a5464..f2de406a 100644
--- a/pkgs/by-name/tr/tree-sitter-yts/src/grammar.json
+++ b/pkgs/by-name/tr/tree-sitter-yts/src/grammar.json
@@ -25,6 +25,13 @@
           "name": "command"
         },
         {
+          "type": "REPEAT",
+          "content": {
+            "type": "SYMBOL",
+            "name": "flag"
+          }
+        },
+        {
           "type": "SYMBOL",
           "name": "id"
         },
@@ -91,9 +98,62 @@
         }
       ]
     },
+    "flag": {
+      "type": "CHOICE",
+      "members": [
+        {
+          "type": "PATTERN",
+          "value": "-\\w [^\\s]+"
+        },
+        {
+          "type": "PATTERN",
+          "value": "-\\w '[^']*'"
+        },
+        {
+          "type": "PATTERN",
+          "value": "-\\w \"[^\"]*\""
+        },
+        {
+          "type": "PATTERN",
+          "value": "-\\w=[^\\s]+"
+        },
+        {
+          "type": "PATTERN",
+          "value": "-\\w='[^']*'"
+        },
+        {
+          "type": "PATTERN",
+          "value": "-\\w=\"[^\"]*\""
+        },
+        {
+          "type": "PATTERN",
+          "value": "--\\w+ [^\\s]+"
+        },
+        {
+          "type": "PATTERN",
+          "value": "--\\w+ '[^']*'"
+        },
+        {
+          "type": "PATTERN",
+          "value": "--\\w+ \"[^\"]*\""
+        },
+        {
+          "type": "PATTERN",
+          "value": "--\\w+=[^\\s]+"
+        },
+        {
+          "type": "PATTERN",
+          "value": "--\\w+='[^']*'"
+        },
+        {
+          "type": "PATTERN",
+          "value": "--\\w+=\"[^\"]*\""
+        }
+      ]
+    },
     "id": {
       "type": "PATTERN",
-      "value": "[0-9]+"
+      "value": "[a-z0-9]+"
     },
     "title": {
       "type": "SEQ",
@@ -157,15 +217,11 @@
           "type": "SEQ",
           "members": [
             {
-              "type": "STRING",
-              "value": "["
-            },
-            {
               "type": "CHOICE",
               "members": [
                 {
                   "type": "STRING",
-                  "value": "No Duration"
+                  "value": "[No Duration]"
                 },
                 {
                   "type": "PATTERN",
@@ -176,10 +232,6 @@
                   "value": "\\d+h \\d+m"
                 }
               ]
-            },
-            {
-              "type": "STRING",
-              "value": "]"
             }
           ]
         },
@@ -223,10 +275,6 @@
     {
       "type": "PATTERN",
       "value": "\\s"
-    },
-    {
-      "type": "PATTERN",
-      "value": "\\\\\\r?\\n"
     }
   ],
   "conflicts": [],