diff options
Diffstat (limited to 'src/main/java/org/anarres/cpp/Preprocessor.java')
-rw-r--r-- | src/main/java/org/anarres/cpp/Preprocessor.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/anarres/cpp/Preprocessor.java b/src/main/java/org/anarres/cpp/Preprocessor.java index f0e5528..c7a106a 100644 --- a/src/main/java/org/anarres/cpp/Preprocessor.java +++ b/src/main/java/org/anarres/cpp/Preprocessor.java @@ -522,7 +522,7 @@ public class Preprocessor implements Closeable { * @see #pop_source() */ // @CheckForNull - protected Source getSource() { + public Source getSource() { return source; } @@ -567,8 +567,11 @@ public class Preprocessor implements Closeable { && t != null) { /* We actually want 'did the nested source * contain a newline token', which isNumbered() - * approximates. This is not perfect, but works. */ - return line_token(t.getLine() + 1, t.getName(), " 2"); + * approximates. This is not perfect, but works. + * FIXME: Removed the '+ 1', since all lines were off by one. + * This solves this case, but I don't know _why_ this was here in the first place. + */ + return line_token(t.getLine() /* SEE ABOVE: + 1 */, t.getName(), " 2"); } return null; |