Community
Participate
Working Groups
There is a default policy in which when a name-based lookup fails (no results) an error handling is performed. This error handling simply accumulates the occurring "errors" with the ultimate goal of producing error markers in the Xtext editors. Currently the error handling tracks which is the CS object (normally an object which holds a name) in order to highlight the ill-formed name that is not found. This needs revision, due to different issues: a) There are some name resolutions which are performed with no CS object/info. For instance, when a 'self' Variable needs to be found for an *implicit* 'self' VariableExp (e.g. x.y as a shorthand of self.x.y) b) There are some name resolutions performed during CS2AS with the sole of disambiguate, hence we don't want to report errors. A more fundamental debate is if these "errors" should be gathered (for further report) when performing the CS2AS transformation. Perhaps, they could be reported in a later stage in a different way. For instance, if the AS element doesn't have a mandatory reference computed, then find the corresponding CS element which will help to report the error. On the other hand, this requires well defined AS meta-models, and a CS2AS solution should be able to identify this kind of failures (name-based lookup failures) without any regard of well designed AS meta-models.
asanchez/497159 contains a commit to help with a)
(In reply to Adolfo Sanchez-Barbudo Herrera from comment #0) > A more fundamental debate is if these "errors" should be gathered (for > further report) when performing the CS2AS transformation. Usability drives a solution. Every error should be reported once (not twice or omitted.) Validation of the AS should report all AS errors since the AS might be produced by other than CS2AS tooling. Therefore anything that can be reported from the AS should be reported by AS validation. Anything that inhibits production of an AS and so is not reportable in the AS should be reported by the CS2AS.