tkobayas commented on PR #7096: URL: https://github.com/apache/incubator-kie/pull/7096#issuecomment-5615679239
@gitgabrio > why this -> `"address?.city == \"London\""` > > returns `true` ? The `shouldPreserveEval` returns true if `?` token exists for simplicity and conservativeness, not validating whole ternary condition syntax. So the above case returns true. However, I noticed that `?.` is not a supported DRL syntax, so it throws an error before reaching `PatternBuilder.parseExpression`. So this test is meaningless and I removed this test. > What is the magic so that -> > > `"name == \"what?\""` returns `false` ? (relates to the comment `Strings and comments are ignored.`) Lexer handles `"what?"` as a string literal, so it's not considered as `QUESTION` token. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
