Skip to content

Add a centralized scanner for Modelica names #635

Description

@AntoineGautier

Part of #620. Element paths are split on ., which breaks quoted identifiers (MLS 3.7 §2.3.1): 'a.b' and 'with-dash' are valid component names. modelica-json and the parser keep them as written, but 6 split(".") sites in the server parser (parser.ts, modification.ts, template.ts, schedule.ts) and the client interpreter cut them apart.

  • Add a name scanner (names.ts) that skips quoted text and escape sequences: split, join
  • Use it everywhere an element path is split
  • Reject quoted class identifiers with an explicit error: they can't be stored in the package directory layout (MLS §13.4.1)
  • Support quoted enumeration literals

Acceptance: unit tests for the scanner; a test package with quoted component names and enumeration literals parses and resolves; golden tests unchanged.

Specification

docs/selection-keys.md, sections "Grammar", "Parsing" and "Values".

Activity

  1. changed the title [-]Support quoted identifiers in element paths[/-] [+]Add a centralized scanner for Modelica names[/+] on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions