Skip to content

Commit

Permalink
Changed Cn11 validation to warning.
Browse files Browse the repository at this point in the history
This makes it possible to define asynchronous connections between state
machines, although the semantics for this is not currently implemented.
See the relevant issues:

* robochart-csp-gen:
UoY-RoboStar/robochart-csp-gen#39
* robochart-textual:
#61
  • Loading branch information
pefribeiro committed Jun 23, 2022
1 parent b5c2479 commit de6d226
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,25 @@ class RoboChartFormatter extends AbstractFormatter2 {
context.regionFor.feature(RoboChartPackage.eINSTANCE.namedElement_Name).surround[oneSpace]
interior(
context.regionFor.keyword('{').append[newLine],
context.regionFor.keyword('}').append[newLines = 2],
context.regionFor.keyword('}').append[newLines = 1],
[indent]
)
for (_child : context.eContents) {
format(_child, document)
_child.append[setNewLines(1, 1, 2)]
_child.append[setNewLines(1, 1, 1)]
}
}

def dispatch void format(RCModule module, extension IFormattableDocument document) {
module.regionFor.feature(RoboChartPackage.eINSTANCE.namedElement_Name).surround[oneSpace]
interior(
module.regionFor.keyword('{').append[newLine],
module.regionFor.keyword('}').append[newLines = 2],
module.regionFor.keyword('}').append[newLines = 1],
[indent]
)
for (_child : module.eContents) {
format(_child, document)
_child.append[setNewLines(1, 1, 2)]
_child.append[setNewLines(1, 1, 1)]
}
}

Expand All @@ -104,7 +104,7 @@ class RoboChartFormatter extends AbstractFormatter2 {
)
for (_child : state.eContents) {
format(_child, document)
_child.append[setNewLines(1, 1, 2)]
_child.append[setNewLines(1, 1, 1)]
}
}

Expand All @@ -119,7 +119,7 @@ class RoboChartFormatter extends AbstractFormatter2 {
transition.regionFor.feature(RoboChartPackage.eINSTANCE.transition_Target).append[newLine]
for (_child : transition.eContents) {
format(_child, document)
_child.append[setNewLines(1, 1, 2)]
_child.append[setNewLines(1, 1, 1)]
}
}

Expand Down

0 comments on commit de6d226

Please sign in to comment.