mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Bug 412457: Makefile Editor does not highlight built-in functions enclosed in curly braces ${...}
This commit is contained in:
parent
d38367d676
commit
1df606bb26
1 changed files with 6 additions and 3 deletions
|
@ -60,6 +60,9 @@ public class FunctionReferenceRule extends WordRule {
|
||||||
public boolean isWordPart(char c) {
|
public boolean isWordPart(char c) {
|
||||||
return !isClosedBracket && (c == '$' || c == openBracket || Character.isJavaIdentifierPart(c) || c == '-');
|
return !isClosedBracket && (c == '$' || c == openBracket || Character.isJavaIdentifierPart(c) || c == '-');
|
||||||
}
|
}
|
||||||
|
public boolean isBracket(char c) {
|
||||||
|
return "(){}".contains(Character.toString(c)); //$NON-NLS-1$
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FunctionReferenceRule(IToken token, String startSeq, String endSeq) {
|
public FunctionReferenceRule(IToken token, String startSeq, String endSeq) {
|
||||||
|
@ -104,7 +107,7 @@ public class FunctionReferenceRule extends WordRule {
|
||||||
if ((char)scanner.read() == ' ') {
|
if ((char)scanner.read() == ' ') {
|
||||||
do {
|
do {
|
||||||
c = scanner.read();
|
c = scanner.read();
|
||||||
} while (c == tagDetector.openBracket || c == tagDetector.closedBracket || fDetector.isWordPart((char) c));
|
} while (((TagDetector) fDetector).isBracket((char)c) || fDetector.isWordPart((char) c));
|
||||||
}
|
}
|
||||||
scanner.unread();
|
scanner.unread();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue