[nem-en] small detail about indent based syntax
Michal Moskal
michal.moskal at gmail.com
Mon Nov 7 10:31:32 CET 2005
On 11/7/05, Philippe Quesnel <philippe.quesnel at gmail.com> wrote:
> "heads-up" for the guys using the indent based syntax:
>
> if you use the 'fallthrough' trick in a match,
> to match multiple cases to one result :
>
> match (s) {
> | "a"
> | "aa" => 1
> | "b"
> | "bb" => 2
> | _ => 0
> }
>
> in indent syntax :
>
> match (s)
> | "a"
> | "aa" => 1
> | "b"
> | "bb" => 2
> | _ => 0
>
> it won't work, you need to use line continuation ('\')
Oh, that's sucks. Maybe this can be somehow solved (for example by
allowing ; before | in matching?).
> hope this helps someone,
> thought I'd share the finding ;-)
It's best to add a note to the wiki: http://nemerle.org/Indentation-based_syntax
Thanks!
--
Michal Moskal,
http://nemerle.org/~malekith/
More information about the devel-en
mailing list