1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix highlighting of macro arguments

This commit is contained in:
Anton Leherbauer 2007-12-18 10:40:32 +00:00
parent f638f58c76
commit f0953b21f0

View file

@ -215,6 +215,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
}
IASTNode macroNode= node.getTranslationUnit().selectNodeForLocation(fFilePath, useOffset, macroLength);
if (macroNode != null && visitMacro(macroNode, macroLength)) {
fMinLocation= useOffset + macroLength;
return false;
}
}
@ -291,11 +292,13 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
return;
}
int offset= nodeLocation.getNodeOffset();
if (offset >= fMinLocation) {
int length= nodeLocation.getNodeLength();
if (offset > -1 && length > 0) {
addPosition(offset, length, highlighting);
}
}
}
/**
* Add the a location range for the given macro highlighting.