summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-26 15:57:10 -0700
committerCarl Worth <cworth@cworth.org>2010-05-26 16:04:31 -0700
commit95951ea7bb8728cf54ae4136cb59d0af9e8a06bd (patch)
tree4855fd796f5404727cf5d7f3a378f0269a3e44de /README
parent0324cad796b7a68634a729719f08fcbb5bbd04cc (diff)
Treat newlines as space when invoking a function-like macro invocation.
This adds three new pieces of state to the parser, (is_control_line, newline_as_space, and paren_count), and a large amount of messy code. I'd definitely like to see a cleaner solution for this. With this fix, the "define-func-extra-newlines" now passes so we put it back to test #26 where it was originally (lately it has been known as test #55). Also, we tweak test 25 slightly. Previously this test was ending a file function-like macro name that was not actually a macro (not followed by a left parenthesis). As is, this fix was making that test fail because the text_line production expects to see a terminating NEWLINE, but that NEWLINE is now getting turned into a SPACE here. This seems unlikely to be a problem in the wild, (function macros being used in a non-macro sense seems rare enough---but more than likely they won't happen at the end of a file). Still, we document this shortcoming in the README.
Diffstat (limited to 'README')
-rw-r--r--README4
1 files changed, 4 insertions, 0 deletions
diff --git a/README b/README
index f0f64c2644..ab42a3ffe1 100644
--- a/README
+++ b/README
@@ -24,3 +24,7 @@ parentheses.
The #error, #pragma, #extension, #version, and #line macros are not
yet supported.
+
+A file that ends with a function-like macro name as the last
+non-whitespace token will result in a parse error, (where it should be
+passed through as is). \ No newline at end of file