Skip to content

syntax role modifiers - #1835

Open
jurgenvinju wants to merge 125 commits into
mainfrom
syntax-role-modifiers
Open

syntax role modifiers#1835
jurgenvinju wants to merge 125 commits into
mainfrom
syntax-role-modifiers

Conversation

@jurgenvinju

@jurgenvinju jurgenvinju commented Jul 7, 2023

Copy link
Copy Markdown
Member

This PR implements syntax role modifiers.

SyntaxModifiers.pdf

  • runtime types for modifiers with open and closed parameters, including subtype, lub and glb
  • subtype lub and glb for Symbol and AType
  • conversions for AST,Symbol and AType
  • JGenie code generator for open type modifiers
  • tests for using modifiers
  • Correct implementation of Explode: AST to separator syntax Tree conversion, using role modifiers
  • Tests for Explode
  • Fixes for deep match on separator syntax trees
  • Tests for deep match
  • Fixes for visit on separator syntax trees (not required since no bugs found)
  • Tests for visit
  • Fixes for match on separators syntax trees (impossible to discover see below)
  • Tests for match (impossible to write on this PR because external parsers are not called on concrete syntax yet)
  • Parameters that have a modifier as outermost type are translated properly to IConstructor or ITree

Note that syntax role modifiers do not introduce the fields of the modified type to the modifier type (yet). That is for another RAP/PR.

@codecov

codecov Bot commented Jul 7, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 34.00868% with 456 lines in your changes missing coverage. Please review.
✅ Project coverage is 45%. Comparing base (2acd8f2) to head (78045b9).

Files with missing lines Patch % Lines
src/org/rascalmpl/types/ModifySyntaxRole.java 25% 220 Missing and 34 partials ⚠️
src/org/rascalmpl/ast/SyntaxRoleModifier.java 25% 84 Missing and 1 partial ⚠️
src/org/rascalmpl/ast/Type.java 43% 17 Missing and 1 partial ⚠️
src/org/rascalmpl/library/Type.java 55% 15 Missing and 1 partial ⚠️
src/org/rascalmpl/types/RascalTypeFactory.java 43% 12 Missing and 1 partial ⚠️
...ascalmpl/semantics/dynamic/SyntaxRoleModifier.java 55% 12 Missing ⚠️
...org/rascalmpl/values/parsetrees/SymbolFactory.java 35% 10 Missing and 1 partial ⚠️
src/org/rascalmpl/types/RascalType.java 27% 7 Missing and 1 partial ⚠️
src/org/rascalmpl/ast/NullASTVisitor.java 0% 6 Missing ⚠️
...almpl/interpreter/staticErrors/UnexpectedType.java 25% 3 Missing and 3 partials ⚠️
... and 11 more
Additional details and impacted files
@@           Coverage Diff            @@
##              main   #1835    +/-   ##
========================================
- Coverage       45%     45%    -1%     
- Complexity    6786    6851    +65     
========================================
  Files          843     847     +4     
  Lines        68798   69492   +694     
  Branches     10029   10152   +123     
========================================
+ Hits         31345   31645   +300     
- Misses       35064   35414   +350     
- Partials      2389    2433    +44     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jurgenvinju

Copy link
Copy Markdown
Member Author

@rodinaarssen could you have a look at this? especially if you think we need more tests.

@jurgenvinju
jurgenvinju marked this pull request as ready for review September 8, 2026 15:30
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants