aboutsummaryrefslogtreecommitdiffstats
path: root/tree-sitter-yts/src/grammar.json
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-14 12:29:47 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-14 12:29:47 +0100
commita9a4ba60a37eb351d3ed872f1cfcf53e673be9ef (patch)
tree59ab6fe348e7e42c10c33799b5ff51433dc16842 /tree-sitter-yts/src/grammar.json
parentfix(yt_dlp/wrappers/info_json): Add missing fields to `Subtitle` (diff)
downloadyt-a9a4ba60a37eb351d3ed872f1cfcf53e673be9ef.zip
feat(tree-sitter-yts): Update to new tree-sitter version & improve parsing
Diffstat (limited to '')
-rw-r--r--tree-sitter-yts/src/grammar.json45
1 files changed, 40 insertions, 5 deletions
diff --git a/tree-sitter-yts/src/grammar.json b/tree-sitter-yts/src/grammar.json
index 65e8122..f2f337c 100644
--- a/tree-sitter-yts/src/grammar.json
+++ b/tree-sitter-yts/src/grammar.json
@@ -1,4 +1,5 @@
{
+ "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
"name": "yts",
"rules": {
"source_file": {
@@ -82,6 +83,22 @@
},
{
"type": "STRING",
+ "value": "watched"
+ },
+ {
+ "type": "STRING",
+ "value": "wd"
+ },
+ {
+ "type": "STRING",
+ "value": "add"
+ },
+ {
+ "type": "STRING",
+ "value": "a"
+ },
+ {
+ "type": "STRING",
"value": "drop"
},
{
@@ -180,8 +197,17 @@
"name": "_q"
},
{
- "type": "PATTERN",
- "value": "\\d{4}-\\d{2}-\\d{2}"
+ "type": "CHOICE",
+ "members": [
+ {
+ "type": "STRING",
+ "value": "[No release date]"
+ },
+ {
+ "type": "PATTERN",
+ "value": "\\d{4}-\\d{2}-\\d{2}"
+ }
+ ]
},
{
"type": "SYMBOL",
@@ -197,8 +223,17 @@
"name": "_q"
},
{
- "type": "PATTERN",
- "value": "[^\"]+"
+ "type": "CHOICE",
+ "members": [
+ {
+ "type": "STRING",
+ "value": "[No author]"
+ },
+ {
+ "type": "PATTERN",
+ "value": "[^\"]+"
+ }
+ ]
},
{
"type": "SYMBOL",
@@ -221,7 +256,7 @@
"members": [
{
"type": "STRING",
- "value": "[No Duration]"
+ "value": "[No duration]"
},
{
"type": "PATTERN",