Commit c2bfe9d0 authored by Nils Goroll's avatar Nils Goroll

Tolerate whitespace in declarations

This fixes a regression against 4.1

Reported by Dridi
parent cbc900ae
......@@ -244,12 +244,12 @@ def arg(txt):
i = s.find(',')
if i < 0:
i = len(s)
a.nm = s[:i]
a.nm = s[:i].rstrip()
s = s[i:]
return a, s
a.nm = s[:i]
s = s[i+1:]
a.nm = s[:i].rstrip()
s = s[i+1:].lstrip()
if s[0] == '"' or s[0] == "'":
m = re.match("(['\"]).*?(\\1)", s)
if not m:
......@@ -260,7 +260,7 @@ def arg(txt):
i = s.find(',')
if i < 0:
i = len(s)
a.defval = s[:i]
a.defval = s[:i].rstrip()
s = s[i:]
return a,s
......@@ -294,6 +294,7 @@ class prototype(object):
while len(s) > 0:
a,s = arg(s)
self.args.append(a)
s = s.lstrip()
if len(s) == 0:
break;
assert s[0] == ','
......
......@@ -103,8 +103,8 @@ Encrypt the HTTP header with quad-ROT13 encryption,
(this is approx 33% better than triple-DES).
$Function STRING argtest(
STRING one, REAL two=2, STRING three="3",
STRING comma=",", INT four=4)
STRING one, REAL two =2, STRING three= "3",
STRING comma="," , INT four = 4 )
$Function INT vre_limit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment