Allow C directives in #.FN_HDR, #.FN_FTR, #.FN_BODY, they have to start with ##

svn path=/trunk/; revision=49763
This commit is contained in:
Tomas Kukosa 2013-06-04 14:07:36 +00:00
parent f37f79b107
commit fd5c1ddf5c
1 changed files with 5 additions and 1 deletions

View File

@ -2352,8 +2352,9 @@ class EthCnf:
lineno = 0
is_import = False
directive = re.compile(r'^\s*#\.(?P<name>[A-Z_][A-Z_0-9]*)(\s+|$)')
cdirective = re.compile(r'^\s*##')
report = re.compile(r'^TABLE(?P<num>\d*)_(?P<type>HDR|BODY|FTR)$')
comment = re.compile(r'^\s*#[^.]')
comment = re.compile(r'^\s*#[^.#]')
empty = re.compile(r'^\s*$')
ctx = None
name = ''
@ -2710,6 +2711,9 @@ class EthCnf:
else:
self.add_item(ctx, par[0], pars=par[1], fn=fn, lineno=lineno)
elif ctx in ('FN_HDR', 'FN_FTR', 'FN_BODY'):
result = cdirective.search(line)
if result: # directive
line = '#' + line[result.end():]
self.add_fn_line(name, ctx, line, fn=fn, lineno=lineno)
elif ctx == 'CLASS':
if empty.match(line): continue