mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 411894: Macros having unconventional but legal characters in names are not highlighted in Makefile Editor
This commit is contained in:
parent
1f57a45477
commit
26e1ef6452
1 changed files with 6 additions and 2 deletions
|
@ -157,9 +157,13 @@ class MacroDefinitionRule implements IPredicateRule {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isValidCharacter(int c) {
|
protected boolean isValidCharacter(int c) {
|
||||||
char c0 = (char) c;
|
// From GNUMakefile manual:
|
||||||
return Character.isLetterOrDigit(c0) || (c0 == '_');
|
// A variable name may be any sequence of characters not containing ‘:’, ‘#’, ‘=’, or leading or trailing whitespace.
|
||||||
|
// However, variable names containing characters other than letters, numbers, and underscores should be avoided,
|
||||||
|
// as they may be given special meanings in the future, and with some shells they cannot be passed through the environment to a sub-make
|
||||||
|
return !Character.isWhitespace(c) && c != ':' && c != '#' && c != '=';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue