diff --git a/src/main/java/glslplugin/lang/parser/PreprocessorPsiBuilderAdapter.java b/src/main/java/glslplugin/lang/parser/PreprocessorPsiBuilderAdapter.java index aadc7e9..f2157f3 100755 --- a/src/main/java/glslplugin/lang/parser/PreprocessorPsiBuilderAdapter.java +++ b/src/main/java/glslplugin/lang/parser/PreprocessorPsiBuilderAdapter.java @@ -134,7 +134,13 @@ private void fillBufferIfEmpty() { final List<@NotNull String> arguments = redefinition.arguments; if (arguments == null) { - result.addAll(redefinition.redefinedTo); + if (redefinition.redefinedTo.isEmpty()) { + // This is pointing to an empty redefinition (with no value) + result.add(new ForeignLeafType(GLSLTokenTypes.PREPROCESSOR_REDEFINED, "")); + } else { + // This is pointing to non-empty redefinition (has any value) + result.addAll(redefinition.redefinedTo); + } } else { // This is a function macro if (parent.getTokenType() != GLSLTokenTypes.LEFT_PAREN) {