Zulip Chat Archive

Stream: lean4

Topic: Syntax.SepArray bug?


Arthur Paulino (Mar 06 2022 at 14:16):

In the following example, I'm able to declare syntax ident,+ : term but I can't match against it:

syntax ident,+ : term

macro_rules
  | `($ids:ident,+) => `([]) -- failed: expected ')'

macro_rules
  | `($ids:ident,*) => `([]) -- works

Am I doing something wrong or is this a bug?

Mario Carneiro (Mar 06 2022 at 15:04):

,+ is not syntax in match expressions. You are supposed to use ,*


Last updated: Dec 20 2023 at 11:08 UTC