summaryrefslogtreecommitdiff
path: root/test/lit
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-02-06 13:35:29 -0800
committerGitHub <noreply@github.com>2024-02-06 13:35:29 -0800
commit8cce4d103a2ee54e7f09e81fc25b982b060d0e41 (patch)
treebfea5d74173a307b5e802cbbaeb4284f12894dc1 /test/lit
parent41b365e99ffd68f427b561121c364028f2c2d2f9 (diff)
downloadbinaryen-8cce4d103a2ee54e7f09e81fc25b982b060d0e41.tar.gz
binaryen-8cce4d103a2ee54e7f09e81fc25b982b060d0e41.tar.bz2
binaryen-8cce4d103a2ee54e7f09e81fc25b982b060d0e41.zip
[Parser] Support string-style identifiers (#6278)
In addition to normal identifiers, support parsing identifiers of the format `$"..."`. This format is not yet allowed by the standard, but it is a popular proposed extension (see https://github.com/WebAssembly/spec/issues/617 and https://github.com/WebAssembly/annotations/issues/21). Binaryen has historically allowed a similar format and has supported arbitrary non-standard identifier characters, so it's much easier to support this extended syntax than to fix everything to use the restricted standard syntax.
Diffstat (limited to 'test/lit')
-rw-r--r--test/lit/wat-kitchen-sink.wast11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/lit/wat-kitchen-sink.wast b/test/lit/wat-kitchen-sink.wast
index 1ab8e7516..32a70d913 100644
--- a/test/lit/wat-kitchen-sink.wast
+++ b/test/lit/wat-kitchen-sink.wast
@@ -380,7 +380,7 @@
;; CHECK: (elem $passive-2 anyref (struct.new_default $s0) (struct.new_default $s0))
(elem $passive-2 anyref (item struct.new $s0) (struct.new $s0))
- ;; CHECK: (elem declare func $ref-func $ref-is-null $table-fill $table-grow $table-set)
+ ;; CHECK: (elem declare func $ref-func $table-fill $table-grow $table-set)
(elem declare func 0 1 2 3)
(elem $declare-2 declare funcref (item ref.func 0) (ref.func 1) (item (ref.func 2)))
@@ -467,6 +467,11 @@
;; CHECK-NEXT: )
(func $f4 (type 18) (local i32 i64) (local $l f32))
+ ;; CHECK: (func $"[quoted_name]" (type $void)
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
+ (func $"[quoted_name]")
+
;; CHECK: (func $nop-skate (type $void)
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: (nop)
@@ -3622,13 +3627,13 @@
;; CHECK-NEXT: (ref.func $ref-func)
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.func $ref-is-null)
+ ;; CHECK-NEXT: (ref.func $ref-func)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $ref-func
ref.func $ref-func
drop
- ref.func 154
+ ref.func 156
drop
)