summaryrefslogtreecommitdiffhomepage
path: root/src/blog/gsp/grammar.js.gsp
diff options
context:
space:
mode:
Diffstat (limited to 'src/blog/gsp/grammar.js.gsp')
-rw-r--r--src/blog/gsp/grammar.js.gsp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/blog/gsp/grammar.js.gsp b/src/blog/gsp/grammar.js.gsp
new file mode 100644
index 0000000..7a06e7f
--- /dev/null
+++ b/src/blog/gsp/grammar.js.gsp
@@ -0,0 +1,12 @@
+{
+ @span .var {-node}: @span .var {-$} => @span .fn {-seq}(
+ @span .fn {-optional}('>'),
+ @span .var {-$.node_name},
+ @span .fn {-optional}(@span .var {-$.attribute_list}),
+ @span .str {-'{'},
+ @span .fn {-optional}(@span .var {-$.node_body}),
+ @span .str {-'\}'},
+ ),
+
+ @span .var {-node_name}: @span .var {-$} => @span .str {-/[a-zA-Z:_][a-zA-Z0-9:_\\-​.]*​/},
+\}