1. Elmar B
  2. pycparser


Elmar Bartel  committed 1545086

Add docstring comment about keep_comment parameter.

  • Participants
  • Parent commits 33b782e
  • Branches default

Comments (0)

Files changed (2)

File pycparser/c_lexer.py

View file
  • Ignore whitespace
                 return True IFF this string is a name of a type
                 that was defined with a typedef earlier.
-	    keep_comment:
-	        We gather all chunks of comments in commentDir.
+            keep_comment:
+                When True,we gather all chunks of comments in
+                commentDir. Key is the name of the file processed,
+                value is the list of comments found in this file.
+                Each list element is a 4-tuple:
+                  [0]: token number of the lexer
+                  [1]: 2-tuple (line, col) of first comment char
+                  [2]: 2-tuple (line, col) of first non-comment char
+                  [3]: comment string
         self.error_func = error_func
         self.type_lookup_func = type_lookup_func

File pycparser/c_parser.py

View file
  • Ignore whitespace
                 Generate a parser.out file that explains how yacc
                 built the parsing table from the grammar.
+            keep_comment:
+                Boolean passed on to CLexer.
+                See there on how to use this.
         self.clex = CLexer(