Skip to content

Support qualified names in function operations - #190

Open
alexwp10 wants to merge 3 commits into
release/7.8.xfrom
fix/function-operation-qualified-name
Open

Support qualified names in function operations#190
alexwp10 wants to merge 3 commits into
release/7.8.xfrom
fix/function-operation-qualified-name

Conversation

@alexwp10

@alexwp10 alexwp10 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

This PR adds support for qualified names in function operation expressions.

Function names following the -> operator can now be qualified using both . and ::. The parser tests cover all combinations of qualified names on both sides of the function operation:

a.b->c.d
a::b->c::d
a::b->c.d
a.b->c::d

The existing parser test was updated to use the generated SysMLQualifiedName AST node.

@mathias-pfeiffer

Copy link
Copy Markdown
Contributor

Sieht gut aus, bitte noch Version um 1 erhöhen in der gradle.properties und danach den gleichen PR auch auf den Main-Branch stellen!

@mathias-pfeiffer
mathias-pfeiffer marked this pull request as draft August 3, 2026 21:01
@alexwp10
alexwp10 marked this pull request as ready for review August 10, 2026 08:16

SysMLFunctionOperationExpression implements Expression <291> =
Expression "->" Name
Expression "->" SysMLQualifiedName

@mathias-pfeiffer mathias-pfeiffer Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Expression "->" SysMLQualifiedName
Expression "->" MCQualifiedName

Siehe https://monticore.github.io/monticore/docs/BestPractices-Syntax-Design/#2-overriding-empty-nonterminal-from-the-super-grammar

Comment thread gradle.properties Outdated

# Version of published artifacts
version = 7.8.72
version = 7.8.73

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitte mit aktuellem Stand vergleichen (git rebase), wir sind bereits bei 7.8.75+

@mathias-pfeiffer
mathias-pfeiffer marked this pull request as draft August 10, 2026 09:24
@alexwp10
alexwp10 force-pushed the fix/function-operation-qualified-name branch from 991158f to 04ef8a8 Compare August 10, 2026 10:32
@alexwp10
alexwp10 marked this pull request as ready for review August 10, 2026 19:01
assertThat(functionOperation.getExpression())
.isInstanceOf(ASTFieldAccessExpression.class);
assertThat(functionOperation.getName()).isEqualTo("c");
assertThat(functionOperation.getSysMLQualifiedName().getPartsList()).containsExactly("c");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mathias-pfeiffer
mathias-pfeiffer marked this pull request as draft August 12, 2026 12:15
@alexwp10
alexwp10 force-pushed the fix/function-operation-qualified-name branch from 1b03c29 to ff2b6b7 Compare August 12, 2026 14:23
@alexwp10
alexwp10 marked this pull request as ready for review August 12, 2026 14:34
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