From b6c86d19d74ac90a2450cf979a92187e691ea5fa Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 9 Aug 2024 02:55:56 +0800 Subject: add yue.is_ast(). --- spec/inputs/macro.yue | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec/inputs') diff --git a/spec/inputs/macro.yue b/spec/inputs/macro.yue index a2e1046..3d4fb10 100644 --- a/spec/inputs/macro.yue +++ b/spec/inputs/macro.yue @@ -38,6 +38,14 @@ print $WindowFlag( NoScrollbar ) +macro NumAndStr = (num, str) -> + import "yue" + unless yue.is_ast("Num", "123") + error "unmatched tokens got" + "[#{num}, #{str}]" + +print $NumAndStr 123, 'xyz' + $asserts item == nil $myconfig false -- cgit v1.2.3-55-g6feb