Reorganize tests into a real spec suite

This commit is contained in:
2024-08-04 19:18:43 -03:00
parent 57c160173c
commit e7c2053222
693 changed files with 136 additions and 116 deletions

View File

@ -0,0 +1,14 @@
---input---
i32.store offset=0xdeadbeef align=0x1
---tokens---
'i32.store' Name.Builtin
' ' Text
'offset' Keyword
'=' Operator
'0xdeadbeef' Literal.Number.Hex
' ' Text
'align' Keyword
'=' Operator
'0x1' Literal.Number.Hex
'\n' Text

View File

@ -0,0 +1,10 @@
---input---
(; comment with ( open paren ;)
---tokens---
'(;' Comment.Multiline
' comment with ' Comment.Multiline
'(' Comment.Multiline
' open paren ' Comment.Multiline
';)' Comment.Multiline
'\n' Text

View File

@ -0,0 +1,10 @@
---input---
(; comment with ; semicolon ;)
---tokens---
'(;' Comment.Multiline
' comment with ' Comment.Multiline
';' Comment.Multiline
' semicolon ' Comment.Multiline
';)' Comment.Multiline
'\n' Text

View File

@ -0,0 +1,6 @@
---input---
i32.const
---tokens---
'i32.const' Name.Builtin
'\n' Text

View File

@ -0,0 +1,11 @@
---input---
(;
comment
;)
---tokens---
'(;' Comment.Multiline
'\n comment\n' Comment.Multiline
';)' Comment.Multiline
'\n' Text

View File

@ -0,0 +1,14 @@
---input---
(;
nested(;;)comment
;)
---tokens---
'(;' Comment.Multiline
'\nnested' Comment.Multiline
'(;' Comment.Multiline
';)' Comment.Multiline
'comment\n' Comment.Multiline
';)' Comment.Multiline
'\n' Text

View File

@ -0,0 +1,9 @@
---input---
"\001"
---tokens---
'"' Literal.String.Double
'\\00' Literal.String.Escape
'1' Literal.String.Double
'"' Literal.String.Double
'\n' Text

View File

@ -0,0 +1,9 @@
---input---
"string\t"
---tokens---
'"' Literal.String.Double
'string' Literal.String.Double
'\\t' Literal.String.Escape
'"' Literal.String.Double
'\n' Text

View File

@ -0,0 +1,6 @@
---input---
$ABCabc123!#$%&'*+./:<=>?@\\^_`|~-A
---tokens---
"$ABCabc123!#$%&'*+./:<=>?@\\\\^_`|~-A" Name.Variable
'\n' Text