diff options
Diffstat (limited to 'tests/icon/accept/named_capture.zc')
| -rw-r--r-- | tests/icon/accept/named_capture.zc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/icon/accept/named_capture.zc b/tests/icon/accept/named_capture.zc new file mode 100644 index 0000000..258004d --- /dev/null +++ b/tests/icon/accept/named_capture.zc @@ -0,0 +1,10 @@ +include rt; +include run; +include icon; +fn main() { + let q = run.tokens("return (2 + 5) * (2 + 5);"); + let p = run.tokens("$expr:x * $expr:x"), r = run.tokens("$x + 1"); + let changed = icon.rewrite(q, p, r); + rt.put_n(run.eval(changed)); rt.put_c(10); + return 0; +} |
