Skip to content

Commit

Permalink
Allow underscore in identifiers. #33
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrem committed Mar 19, 2022
1 parent ef10284 commit b9a98c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/remgant/tools/parser/Token.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public Operator(String v) {


public static class Identifier extends Token {
private static final Pattern instancePattern = Pattern.compile("\\p{Alpha}\\p{Alnum}*");
private static final Pattern instancePattern = Pattern.compile("\\p{Alpha}\\w*");
public static final Predicate<Token> INSTANCE = (t) -> instancePattern.matcher(t.value).matches();

static {
Expand Down

0 comments on commit b9a98c1

Please sign in to comment.