aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/anarres/cpp/Preprocessor.java
diff options
context:
space:
mode:
authorShevek <[email protected]>2014-01-17 22:01:07 -0800
committerShevek <[email protected]>2014-01-17 22:01:07 -0800
commitca42036955f2589d034a688267eb81c5da2c824d (patch)
treebba007070561d64ce2b48f82b2bcf075a4631878 /src/main/java/org/anarres/cpp/Preprocessor.java
parent5e8bc477e233588204cdea0e8a3dafedc4b66de2 (diff)
Fix lots of NumericValue issues - probably more to go.
Diffstat (limited to 'src/main/java/org/anarres/cpp/Preprocessor.java')
-rw-r--r--src/main/java/org/anarres/cpp/Preprocessor.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/org/anarres/cpp/Preprocessor.java b/src/main/java/org/anarres/cpp/Preprocessor.java
index e4ecdc1..cb7c633 100644
--- a/src/main/java/org/anarres/cpp/Preprocessor.java
+++ b/src/main/java/org/anarres/cpp/Preprocessor.java
@@ -787,8 +787,8 @@ public class Preprocessor implements Closeable {
push_source(new FixedTokenSource(
new Token[]{new Token(NUMBER,
orig.getLine(), orig.getColumn(),
- String.valueOf(orig.getLine()),
- new NumericValue(10, "" + orig.getLine()))}
+ Integer.toString(orig.getLine()),
+ new NumericValue(10, false, Integer.toString(orig.getLine())))}
), true);
} else if (m == __FILE__) {
StringBuilder buf = new StringBuilder("\"");
@@ -823,8 +823,8 @@ public class Preprocessor implements Closeable {
push_source(new FixedTokenSource(
new Token[]{new Token(NUMBER,
orig.getLine(), orig.getColumn(),
- String.valueOf(value),
- new NumericValue(10, "" + value))}
+ Integer.toString(value),
+ new NumericValue(10, false, Integer.toString(value)))}
), true);
} else {
push_source(new MacroTokenSource(m, args), true);
@@ -1388,17 +1388,17 @@ public class Preprocessor implements Closeable {
+ la.getText());
tok = new Token(NUMBER,
la.getLine(), la.getColumn(),
- "0", new NumericValue(10, "0"));
+ "0", new NumericValue(10, false, "0"));
} else if (macros.containsKey(la.getText())) {
// System.out.println("Found macro");
tok = new Token(NUMBER,
la.getLine(), la.getColumn(),
- "1", new NumericValue(10, "1"));
+ "1", new NumericValue(10, false, "1"));
} else {
// System.out.println("Not found macro");
tok = new Token(NUMBER,
la.getLine(), la.getColumn(),
- "0", new NumericValue(10, "0"));
+ "0", new NumericValue(10, false, "0"));
}
if (paren) {