mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #636 from processing/qualified-name-guard
Resolve #521 (color in qualifiedname)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user