aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/anarres/cpp/Macro.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-23 20:46:54 +0100
committerSven Gothel <[email protected]>2015-03-23 20:46:54 +0100
commit6d805e3f526b30144649232246d5ffdc04a31ebf (patch)
treea632ae9a9c6862734a5b63292a12b5bfd34b13a7 /src/main/java/org/anarres/cpp/Macro.java
parenta5720fcb97b41c86f86537ffa512b1e802128a9e (diff)
Preprocessor.addMacro: Expand active macros w/ non-expanding source right away, when defined.
We use the expanded macros within GlueGen, hence we expand them as they are defined. This shall also reduce the load on later per-use expansion.
Diffstat (limited to 'src/main/java/org/anarres/cpp/Macro.java')
-rw-r--r--src/main/java/org/anarres/cpp/Macro.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/anarres/cpp/Macro.java b/src/main/java/org/anarres/cpp/Macro.java
index f8a920a..ce00930 100644
--- a/src/main/java/org/anarres/cpp/Macro.java
+++ b/src/main/java/org/anarres/cpp/Macro.java
@@ -138,6 +138,9 @@ public class Macro {
/* pp */ List<Token> getTokens() {
return tokens;
}
+ /* pp */ void setTokens(final List<Token> tokens) {
+ this.tokens = tokens;
+ }
/* Paste tokens are inserted before the first of the two pasted
* tokens, so it's a kind of bytecode notation. This method