Release: Actifsource V11.3.0
It should be possible to define additional validators in the codesnippet (besides the syntax check). Which marks the found inconsistency at the appropriate place in the codesnippet.
This can be used customer specific to e.g. check number and type of function parameters or type compatibility for assignments (Type safety)...
The validation should be done by a usual 'ResourceValidationAspect' which is defined e.g. on the parent resource of the codesnippet.
In addition, the transient CMinus 'CompilationUnit' should be able to be used.
To find back from the parsed cMinus 'CompilationUnit' to the exact position in the codesnippet, the BackLink must be enabled:

Codesnippet to validate:

Parsed cMinus 'CompilationUnit' from codesnippet:

Each expression now has a backlink over which the range in the codesnippet is defined.
To validate the codesnippet, a validation aspect must be defined:

Using the CompilationUnit the Invalid expressions can be found and the inconsistencies can be added as e.g. warning:

The Codesnippet shows the warning:

On github the example has been extended:
It should be possible to define additional validators in the codesnippet (besides the syntax check). Which marks the found inconsistency at the appropriate place in the codesnippet.
This can be used customer specific to e.g. check number and type of function parameters or type compatibility for assignments (Type safety)...
The validation should be done by a usual 'ResourceValidationAspect' which is defined e.g. on the parent resource of the codesnippet.
In addition, the transient CMinus 'CompilationUnit' should be able to be used.
To find back from the parsed cMinus 'CompilationUnit' to the exact position in the codesnippet, the BackLink must be enabled:

Codesnippet to validate:

Parsed cMinus 'CompilationUnit' from codesnippet:

Each expression now has a backlink over which the range in the codesnippet is defined.
To validate the codesnippet, a validation aspect must be defined:

Using the CompilationUnit the Invalid expressions can be found and the inconsistencies can be added as e.g. warning:

The Codesnippet shows the warning:

On github the example has been extended: