Spec for better (or) handling in (case)
This commit is contained in:
@@ -340,7 +340,17 @@
|
||||
(otherwise (Assert.fail)))
|
||||
(case 5
|
||||
((when false (or 5 6)) (Assert.fail))
|
||||
(otherwise (Assert.pass))))
|
||||
(otherwise (Assert.pass)))
|
||||
// TODO in Haxe,
|
||||
// `switch (Some(true)) { case Some(true | false): "a"; default: "b"; }`
|
||||
// returns "a", so this should also be valid:
|
||||
/*(case (Some true)
|
||||
((Some (or true false))
|
||||
(Assert.pass))
|
||||
(otherwise (Assert.fail)))*/
|
||||
// ^ Implement by overriding the `or` macro with an `or` special form to return variadically nested OpOr binop exps
|
||||
// in KissState.forCaseParsing() instead of handling CallExp(Symbol(or)) specially
|
||||
)
|
||||
|
||||
(defun _testMaps []
|
||||
(deflocal :Map<String,String> myMap [=>"hey" "you"
|
||||
|
Reference in New Issue
Block a user