mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
bug 406911: Highlight $$(...) same as $(...) for meaningful highlight inside define/endef in Makefile Editor
This commit is contained in:
parent
5f19186a60
commit
566130590d
2 changed files with 4 additions and 1 deletions
|
@ -43,7 +43,7 @@ public class FunctionReferenceRule extends WordRule {
|
|||
}
|
||||
@Override
|
||||
public boolean isWordPart(char c) {
|
||||
return !isClosedBracket && (c == '(' || Character.isJavaIdentifierPart(c) || c == '-');
|
||||
return !isClosedBracket && (c == '$' || c == '(' || Character.isJavaIdentifierPart(c) || c == '-');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,7 @@ public class FunctionReferenceRule extends WordRule {
|
|||
super(new TagDetector());
|
||||
for (String f : functions) {
|
||||
addWord("$(" + f, token); //$NON-NLS-1$
|
||||
addWord("$$(" + f, token); //$NON-NLS-1$
|
||||
}
|
||||
addWord(")", token); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -95,7 +95,9 @@ public class MakefileCodeScanner extends AbstractMakefileCodeScanner {
|
|||
|
||||
rules.add(new AutomaticVariableReferenceRule(macroRefToken));
|
||||
rules.add(new MacroReferenceRule(macroRefToken, "$(", ")")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rules.add(new MacroReferenceRule(macroRefToken, "$$(", ")")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rules.add(new MacroReferenceRule(macroRefToken, "${", "}")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rules.add(new MacroReferenceRule(macroRefToken, "$${", "}")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
setDefaultReturnToken(defaultToken);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue