summaryrefslogtreecommitdiffstats
path: root/src/java/org/anarres/cpp/Source.java
diff options
context:
space:
mode:
authorShevek <[email protected]>2008-05-18 09:27:03 +0000
committerShevek <[email protected]>2008-05-18 09:27:03 +0000
commit3f20b68474d21a608f2370764c3714cb2aa4c62d (patch)
tree80eb81251aaf75c1f3f05748ee6458bd078a33cb /src/java/org/anarres/cpp/Source.java
parent6babf0976fb92966d707577b1c0080ef69d54ef5 (diff)
update findbugs, work towards 1.2
Diffstat (limited to 'src/java/org/anarres/cpp/Source.java')
-rw-r--r--src/java/org/anarres/cpp/Source.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/java/org/anarres/cpp/Source.java b/src/java/org/anarres/cpp/Source.java
index 0bc1476..e7a6d2d 100644
--- a/src/java/org/anarres/cpp/Source.java
+++ b/src/java/org/anarres/cpp/Source.java
@@ -98,11 +98,14 @@ public abstract class Source implements Iterable<Token> {
return parent;
}
- public void setListener(PreprocessorListener listener) {
- this.listener = listener;
+ // @OverrideMustInvoke
+ /* pp */ void init(Preprocessor pp) {
+ setListener(pp.getListener());
}
- public void setFeatures(Set<Feature> features) {
+ /* Actually just used for testing. */
+ public void setListener(PreprocessorListener pl) {
+ this.listener = pl;
}
/**
@@ -141,6 +144,13 @@ public abstract class Source implements Iterable<Token> {
return parent.getLine();
}
+ public int getColumn() {
+ Source parent = getParent();
+ if (parent == null)
+ return 0;
+ return parent.getColumn();
+ }
+
/* pp */ boolean isExpanding(Macro m) {
Source parent = getParent();
if (parent != null)