Skip to content

Element metadata with key group breaks parser #2932

@georgecrawford

Description

@georgecrawford

Relates to

LikeC4 Language

Version you are using

1.56.0

Describe the issue

An element metadata entry with key group seems to be treated as a keyword, and breaks parsing.

Input:

specification {
  element system
}

model {
  system test {
    metadata {
      team 'team name'
      _group '_group name'
      group 'group name'
      other 'other name'
    }
  } 
}

…gives the error:

Playground has errors
L11:7 Expecting token of type '}' but found `group`.
L11:7 Expecting: one of these possible Token sequences: 1. [Dot] 2. [-[] 3. [->] 4. [IdTerminal, StickyDot] 5. 
…snip…
[instance, Eq] 4803. [relationship, Eq] but found: 'group'
Image

You can see the first two metadata entries are parsed correctly, and then the parser halts:
Image

If possible, include link to the playground with example

https://playground.likec4.dev/w/FNSq-C/index/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions