mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 17:25:38 +02:00
Some variable contains +=
This commit is contained in:
parent
c6b5dbad42
commit
084ae250ef
1 changed files with 4 additions and 3 deletions
|
@ -17,6 +17,7 @@ import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
|
||||||
public class MacroDefinition extends Statement implements IMacroDefinition {
|
public class MacroDefinition extends Statement implements IMacroDefinition {
|
||||||
String name;
|
String name;
|
||||||
StringBuffer value;
|
StringBuffer value;
|
||||||
|
char sepChar;
|
||||||
|
|
||||||
public MacroDefinition(String line) {
|
public MacroDefinition(String line) {
|
||||||
value = new StringBuffer();
|
value = new StringBuffer();
|
||||||
|
@ -25,9 +26,9 @@ public class MacroDefinition extends Statement implements IMacroDefinition {
|
||||||
int separator = index;
|
int separator = index;
|
||||||
// Check for "+=", ":="
|
// Check for "+=", ":="
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
char c = line.charAt(index - 1);
|
sepChar = line.charAt(index - 1);
|
||||||
if (c == ':' || c =='+') {
|
if (sepChar == ':' || sepChar =='+' || sepChar == '?') {
|
||||||
separator = index -1;
|
separator = index - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
name = line.substring(0, separator).trim();
|
name = line.substring(0, separator).trim();
|
||||||
|
|
Loading…
Add table
Reference in a new issue