]
Matteo Mortari updated DROOLS-2988:
-----------------------------------
Story Points: 5
Question Mark should always be leading in qualified names
---------------------------------------------------------
Key: DROOLS-2988
URL:
https://issues.jboss.org/browse/DROOLS-2988
Project: Drools
Issue Type: Enhancement
Reporter: Edoardo Vacchi
Assignee: Matteo Mortari
Priority: Major
Labels: drools-core
The QuestionMark identifier is recognized as part of a qualified name, but it should only
be admitted as the first fragment. Currently we are not accounting for edge cases such as
`foo.?.bar`. This should be probably reported as a syntax error, as it does not make any
sense, but we can ignore it for now.
Relevant lines:
https://github.com/kiegroup/drools/blob/c82693e41ce4713ca466fb6947e4a046e...
Memo: Recognition of `? ` is done via a global variable. We should rather refactor this
as to carry the information correctly in a DirectCompilerResult. This was deemed a bit
complicated because of the level of nesting of tree nodes. We can do this when/if we
refactor the compiler to use a proper AST