Resolve #521 (color in qualifiedname for EDT)

This commit is contained in:
A Samuel Pottinger
2023-01-14 19:11:08 +00:00
parent b8988b8af0
commit 34cf13e9c2

View File

@@ -635,7 +635,8 @@ public class PdeParseTreeListener extends ProcessingBaseListener {
* @param ctx ANTLR context for the type token.
*/
public void exitColorPrimitiveType(ProcessingParser.ColorPrimitiveTypeContext ctx) {
if (ctx.getText().equals("color")) {
boolean isQualifiedName = ctx.getParent() instanceof ProcessingParser.QualifiedNameContext;
if (ctx.getText().equals("color") && !isQualifiedName) {
insertAfter(ctx.stop, "int");
delete(ctx.start, ctx.stop);
}