1. Elmar B
  2. pycparser

Commits

Elmar Bartel  committed d6df52e

Add keep_comment argument to CParser().

  • Participants
  • Parent commits 8642020
  • Branches default

Comments (0)

Files changed (1)

File pycparser/c_parser.py

View file
             lextab='pycparser.lextab',
             yacc_optimize=True,
             yacctab='pycparser.yacctab',
-            yacc_debug=False):
+            yacc_debug=False,
+	    keep_comment=False,
+    ):
         """ Create a new CParser.
 
             Some arguments for controlling the debug/optimization
         """
         self.clex = CLexer(
             error_func=self._lex_error_func,
-            type_lookup_func=self._lex_type_lookup_func)
+            type_lookup_func=self._lex_type_lookup_func,
+	    keep_comment= keep_comment,
+	)
 
         self.clex.build(
             optimize=lex_optimize,