Skip to content

Add openfga-language, a pest port of the OpenFGA DSL grammar - #3

Open
LucaCappelletti94 wants to merge 2 commits into
d1-openfga-modelfrom
d2-pest-parser
Open

LucaCappelletti94 wants to merge 2 commits into
d1-openfga-modelfrom
d2-pest-parser

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Owner

openfga-language parses OpenFGA DSL into the openfga-model types under no_std. Its grammar is a rule-by-rule pest port of OpenFGALexer.g4 and OpenFGAParser.g4, and each pest rule names the ANTLR rule it ports, so a later grammar change upstream maps to an edit here. The lowering mirrors the Go transformer, including the errors it raises while transforming.

All transformer cases of openfga/language lower to their expected models, and the syntax cases fail exactly when they list errors, which is the Go test's criterion since it does not compare ANTLR messages either.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1c2c4957-79ea-4eec-98c7-9e0070419478

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (078bfd8) to head (365fe18).

Additional details and impacted files
@@                 Coverage Diff                 @@
##           d1-openfga-model        #3    +/-   ##
===================================================
  Coverage            100.00%   100.00%            
===================================================
  Files                     1         4     +3     
  Lines                    24       273   +249     
===================================================
+ Hits                     24       273   +249     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant