Skip to content

Clean up reprolang's grammar#433

Merged
jupblb merged 2 commits into
mainfrom
michal/reprolang-2
Jun 3, 2026
Merged

Clean up reprolang's grammar#433
jupblb merged 2 commits into
mainfrom
michal/reprolang-2

Conversation

@jupblb
Copy link
Copy Markdown
Member

@jupblb jupblb commented Jun 3, 2026

This is a minor cleanup. Ideally we can cover more SCIP features in reprolang in the future.

jupblb added 2 commits June 3, 2026 11:06
- Fix '# doctring:' typo in parser.go that compensated for itself by
  accident (lengths matched).
- Fix README claim about a 'global' keyword that never existed.
- Rename field 'roles' to 'relations' to match SCIP terminology.
- Drop '_relation' suffix from rule names (implements, references,
  type_defines, defined_by).
- Promote 'forward_definition' to its own rule.
- Drop explicit '\n' statement terminator; extras already handle it.
Extract parseDocstring and parseRelations helpers so each function has
one responsibility. The dispatch loop now reads as a flat switch.

Re-add 'forward_definition' as a field on reference_statement so Go can
detect it with a one-line ChildByFieldName check (no longer
self-referential now that forward_definition is its own rule).
@jupblb jupblb requested review from emidoots, eseliger and trly June 3, 2026 09:15
@jupblb jupblb enabled auto-merge (squash) June 3, 2026 09:15
@jupblb jupblb merged commit 88f90db into main Jun 3, 2026
13 checks passed
@jupblb jupblb deleted the michal/reprolang-2 branch June 3, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants