mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Allow whitespace before '#' in preprocessor directives.
This commit is contained in:
parent
ac279109d4
commit
6100d914e8
1 changed files with 4 additions and 3 deletions
|
@ -23,12 +23,13 @@
|
|||
|
||||
import sys, regex, regsub, string, getopt, os
|
||||
|
||||
p_define = regex.compile('^#[\t ]*define[\t ]+\([a-zA-Z0-9_]+\)[\t ]+')
|
||||
p_define = regex.compile('^[\t ]*#[\t ]*define[\t ]+\([a-zA-Z0-9_]+\)[\t ]+')
|
||||
|
||||
p_macro = regex.compile(
|
||||
'^#[\t ]*define[\t ]+\([a-zA-Z0-9_]+\)(\([_a-zA-Z][_a-zA-Z0-9]*\))[\t ]+')
|
||||
'^[\t ]*#[\t ]*define[\t ]+'
|
||||
'\([a-zA-Z0-9_]+\)(\([_a-zA-Z][_a-zA-Z0-9]*\))[\t ]+')
|
||||
|
||||
p_include = regex.compile('^#[\t ]*include[\t ]+<\([a-zA-Z0-9_/\.]+\)')
|
||||
p_include = regex.compile('^[\t ]*#[\t ]*include[\t ]+<\([a-zA-Z0-9_/\.]+\)')
|
||||
|
||||
p_comment = regex.compile('/\*\([^*]+\|\*+[^/]\)*\(\*+/\)?')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue