From 0ccf4408271c8a0d147e3cf25689810862e8c1db Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 24 Feb 2026 12:24:10 +0800 Subject: Cleaned up and fixed more comment reserving codes. --- spec/inputs/switch.yue | 14 ++++++++++++++ spec/inputs/whitespace.yue | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) (limited to 'spec/inputs') diff --git a/spec/inputs/switch.yue b/spec/inputs/switch.yue index 2b0669c..b969a17 100644 --- a/spec/inputs/switch.yue +++ b/spec/inputs/switch.yue @@ -289,4 +289,18 @@ do handlePath ["admin", "logs", "view"] +do + _check_cond_expr = (iftyp, n, args) -> + sw = { ct: iftyp, op: op } + why = switch sw + -- woo + when ct: 'if', op: '==' + 'never' + when ct: 'if', op: '!=' + 'always' + when ct: 'unless', op: '==' + 'always' + when ct: 'unless', op: '!=' + 'never' + nil diff --git a/spec/inputs/whitespace.yue b/spec/inputs/whitespace.yue index a999143..d0acdde 100644 --- a/spec/inputs/whitespace.yue +++ b/spec/inputs/whitespace.yue @@ -198,5 +198,52 @@ do -- two b: -> -- 2 +do + tb = { + + -- hello + print 123 + -- abc + + + + + + + + abc: 1 + + + -- xyz + c: "" + + + z: 998 + + : -> + + -- hello + : -> + --[[OK]] --[[OK]]--good + : -> + } + + class CY + -- init xa + xa = 1 + -- init xb + local xb = 2 + + -- new + new: => print xa, xb, xc, xd + + + -- init xc + const xc = 3 + + -- wait + + -- init xd + close xd = : => nil -- cgit v1.2.3-55-g6feb