summaryrefslogtreecommitdiff
path: root/pycparser/_c_ast.cfg
diff options
context:
space:
mode:
authorJulian Hammer <julian.hammer@fau.de>2015-10-12 15:52:12 +0200
committerJulian Hammer <julian.hammer@fau.de>2015-10-20 13:01:13 +0200
commitdb9f2da09c9415e16cb76d18040ccb59579d6662 (patch)
tree13edc10a7879a9b8507080019f813b06f91847e6 /pycparser/_c_ast.cfg
parentb846bb008c6fb89f544a76603fa74413fdbbe407 (diff)
downloadpycparser-db9f2da09c9415e16cb76d18040ccb59579d6662.tar.gz
Add support for #pragma
Preprocessor pragmas and their arguments are tokenized (as PPPRAGMA and PPPRAGMASTR) and included in the AST as a pppragma directive with the argument as value. If no argument was given the string will be empty. Unit test of the lexer, parser and generator have been modified and added accordingly. The previous behavior, that #pragma lines would be ignored, is henceforth obsolete.
Diffstat (limited to 'pycparser/_c_ast.cfg')
-rw-r--r--pycparser/_c_ast.cfg2
1 files changed, 2 insertions, 0 deletions
diff --git a/pycparser/_c_ast.cfg b/pycparser/_c_ast.cfg
index fad5691..10c73e1 100644
--- a/pycparser/_c_ast.cfg
+++ b/pycparser/_c_ast.cfg
@@ -187,3 +187,5 @@ UnaryOp: [op, expr*]
Union: [name, decls**]
While: [cond*, stmt*]
+
+Pragma: [string]