Skip to content

Commit

Permalink
#57: Added ability to distinguish between variables and fields for be…
Browse files Browse the repository at this point in the history
…tter colourisation support in Intellij plugin
  • Loading branch information
jaccomoc committed Oct 5, 2024
1 parent aa65e2e commit a8dec6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/jactl/JactlName.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class JactlName extends JactlUserDataHolder {
private NameType type;

public enum NameType {
FILE, PACKAGE, CLASS, FUNCTION, METHOD, VARIABLE, PARAMETER
FILE, PACKAGE, CLASS, FUNCTION, METHOD, FIELD, VARIABLE, PARAMETER
}

public JactlName(Token name, NameType type) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/jactl/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ private Stmt.VarDecl singleVarDecl(JactlType type, boolean inClassDecl, boolean
else {
return advance();
}
}, isParameter ? JactlName.NameType.PARAMETER : JactlName.NameType.VARIABLE);
}, isParameter ? JactlName.NameType.PARAMETER : inClassDecl ? JactlName.NameType.FIELD : JactlName.NameType.VARIABLE);
Expr initialiser = null;
Token equalsToken = null;
if (matchAny(EQUAL)) {
Expand Down

0 comments on commit a8dec6b

Please sign in to comment.