diff options
| author | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-22 20:30:23 +0900 |
|---|---|---|
| committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-22 20:30:23 +0900 |
| commit | 0baa69676ca83dbb4fe7241478a6ecf6c85418a9 (patch) | |
| tree | f337b96c1d2c4742647b9e4570d34788014333d3 /spec/lexspec.json | |
| parent | Write a description file (diff) | |
| download | cotia-0baa69676ca83dbb4fe7241478a6ecf6c85418a9.tar.gz cotia-0baa69676ca83dbb4fe7241478a6ecf6c85418a9.tar.xz | |
Add literal pattern syntax and change tree structure syntax
- Literal patterns don't interpret the special characters of regular expressions.
In other words, 'abc|def' matches only `abc|def`, not `abc` or `def`.
- Change tree structure syntax from '(...) to #(...).
Diffstat (limited to 'spec/lexspec.json')
| -rw-r--r-- | spec/lexspec.json | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/lexspec.json b/spec/lexspec.json index 6d1dd93..d95d31a 100644 --- a/spec/lexspec.json +++ b/spec/lexspec.json @@ -67,6 +67,10 @@ "pop": true }, { + "kind": "literal_pattern", + "pattern": "'[^']*'" + }, + { "kind": "colon", "pattern": ":" }, @@ -79,12 +83,8 @@ "pattern": ";" }, { - "kind": "directive_marker", - "pattern": "#" - }, - { "kind": "tree_node_open", - "pattern": "'\\(" + "pattern": "#\\(" }, { "kind": "tree_node_close", @@ -97,6 +97,10 @@ { "kind": "expansion", "pattern": "\\.\\.\\." + }, + { + "kind": "directive_marker", + "pattern": "#" } ] } |
