yurloc commented on code in PR #5898:
URL:
https://github.com/apache/incubator-kie-drools/pull/5898#discussion_r1592023293
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/LexerHelper.java:
##########
@@ -29,9 +29,10 @@
*/
public class LexerHelper {
- private static final List<Character> semiAndWS = List.of(';', ' ', '\t',
'\n', '\r');
- private static final List<String> statementKeywordsList =
List.of(ParserHelper.statementKeywords);
- private static final List<String> attributeKeywordsList =
List.of(DroolsSoftKeywords.SALIENCE,
+ private static final Set<Character> semiAndWS = Set.of(';', ' ', '\t',
'\n', '\r');
+ private static final Set<Character> delimiters = Set.of(';', ' ', '\t',
'\n', '\r', '"', '\'');
+ private static final Set<String> statementKeywordsList =
Set.of(ParserHelper.statementKeywords);
+ private static final Set<String> attributeKeywordsList =
Set.of(DroolsSoftKeywords.SALIENCE,
Review Comment:
Not directly related to the fix but I thought it makes more sense to use a
set here as the elements are unique, order is insignificant and hash sets
should have a faster lookup (_O(1)_).
--
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]