Skip to content
Snippets Groups Projects

Resolve "Feature: Add context-free connect"

Merged René Schöne requested to merge 34-feature-add-context-free-connect into dev
6 files
+ 58
24
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -3,6 +3,7 @@ aspect ParserRewrites {
when (getChildName() != null && tryGloballyResolveTypeComponentByToken(combinedName()) != null)
to TypeEndpointTarget {
TypeEndpointTarget result = new TypeEndpointTarget();
result.copyOtherValuesFrom(this);
result.setType(TypeComponent.createRef(this.combinedName()));
return result;
}
@@ -10,6 +11,7 @@ aspect ParserRewrites {
when (getChildName() != null && tryGloballyResolveTokenComponentByToken(combinedName()) != null)
to TokenEndpointTarget {
TokenEndpointTarget result = new TokenEndpointTarget();
result.copyOtherValuesFrom(this);
result.setToken(TokenComponent.createRef(this.combinedName()));
return result;
}
@@ -17,6 +19,7 @@ aspect ParserRewrites {
when (getChildName() == "")
to ContextFreeTypeEndpointTarget {
ContextFreeTypeEndpointTarget result = new ContextFreeTypeEndpointTarget();
result.copyOtherValuesFrom(this);
result.setTypeDecl(TypeDecl.createRef(getTypeName()));
return result;
}
@@ -24,6 +27,11 @@ aspect ParserRewrites {
syn String UntypedEndpointTarget.combinedName() = getTypeName() + "." + getChildName();
protected void EndpointTarget.copyOtherValuesFrom(EndpointTarget source) {
this.setStart(source.getStartLine(), source.getStartColumn());
this.setEnd(source.getEndLine(), source.getEndColumn());
}
eq UntypedEndpointTarget.senderName() = "<untyped.senderName>";
eq UntypedEndpointTarget.getterMethodName() = "<untyped.getterMethodName>";
eq UntypedEndpointTarget.parentTypeName() = "<untyped.parentTypeName>";
Loading