feat(package): hemar: tree sitter grammar
This commit is contained in:
114
package/hemar/grammar/tree-sitter/test/corpus/basic.txt
Normal file
114
package/hemar/grammar/tree-sitter/test/corpus/basic.txt
Normal file
@@ -0,0 +1,114 @@
|
||||
==================
|
||||
simple tag
|
||||
==================
|
||||
{[hello]}
|
||||
---
|
||||
(source_file
|
||||
(element
|
||||
(interpolation
|
||||
(path
|
||||
(string)))))
|
||||
==================
|
||||
text + tag
|
||||
==================
|
||||
foo {[bar]} baz
|
||||
---
|
||||
(source_file
|
||||
(element
|
||||
(text))
|
||||
(element
|
||||
(interpolation
|
||||
(path
|
||||
(string))))
|
||||
(element
|
||||
(text)))
|
||||
|
||||
==================
|
||||
text + tag with quoted string
|
||||
==================
|
||||
foo {[".\]"]} foo {[""""]} baz
|
||||
---
|
||||
(source_file
|
||||
(element
|
||||
(text))
|
||||
(element
|
||||
(interpolation
|
||||
(path
|
||||
(string))))
|
||||
(element
|
||||
(text))
|
||||
(element
|
||||
(interpolation
|
||||
(path
|
||||
(string))))
|
||||
(element
|
||||
(text)))
|
||||
|
||||
==================
|
||||
quoted dote path vs root path
|
||||
==================
|
||||
{["."]} {[.]}
|
||||
---
|
||||
(source_file
|
||||
(element
|
||||
(interpolation
|
||||
(path
|
||||
(string
|
||||
))))
|
||||
(element
|
||||
(interpolation
|
||||
(path))))
|
||||
==================
|
||||
long path
|
||||
==================
|
||||
{["key".subkey."subsubkey"]}
|
||||
---
|
||||
(source_file
|
||||
(element
|
||||
(interpolation
|
||||
(path
|
||||
(string)
|
||||
(string)
|
||||
(string)))))
|
||||
==================
|
||||
segment error
|
||||
==================
|
||||
{[ for i in key ]}
|
||||
---
|
||||
(source_file
|
||||
(ERROR
|
||||
(for
|
||||
(string)
|
||||
(path
|
||||
(string)))))
|
||||
==================
|
||||
segment
|
||||
==================
|
||||
{[ for i in key ]}
|
||||
{[ done ]}
|
||||
---
|
||||
(source_file
|
||||
(element
|
||||
(segment
|
||||
(for
|
||||
(string)
|
||||
(path
|
||||
(string)))
|
||||
(done))))
|
||||
==================
|
||||
segment with text
|
||||
==================
|
||||
{[ for i in key ]}
|
||||
foo bar baz
|
||||
{[ done ]}
|
||||
---
|
||||
(source_file
|
||||
(element
|
||||
(segment
|
||||
(for
|
||||
(string)
|
||||
(path
|
||||
(string)))
|
||||
(element
|
||||
(text))
|
||||
(done))))
|
||||
Reference in New Issue
Block a user