From 3a084cfad7aa8da8d2c4b7849347b0832ef8e87e Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 20 Feb 2020 13:39:26 +0800 Subject: allow value list in assignment to be multiline fixing Moonscript issue 390. --- spec/inputs/class.moon | 16 ++++++++++++++++ spec/inputs/whitespace.moon | 14 +++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/inputs/class.moon b/spec/inputs/class.moon index 83f3760..3288dc6 100644 --- a/spec/inputs/class.moon +++ b/spec/inputs/class.moon @@ -210,4 +210,20 @@ class Wowha extends Thing super\hello } +do + class Test + new: => @@if = true + @do: => 1 + test: => @@if and @@do! + test = Test! + test\test! + +do + class Test + new: => @if = true + do: => 1 + test: => @if and @do! + test = Test! + test\test! + nil diff --git a/spec/inputs/whitespace.moon b/spec/inputs/whitespace.moon index 36f14ae..0422443 100644 --- a/spec/inputs/whitespace.moon +++ b/spec/inputs/whitespace.moon @@ -97,6 +97,18 @@ b( c(one, two, three, four) --- +-- + +f = -> + a, + b, + c + +a, + b, + c = 1, + 2, + f + :abc nil -- cgit v1.2.3-55-g6feb