Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
35db7bbb
Commit
35db7bbb
authored
Jan 31, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a regexp iterator (nice concept!) to separate the arguments
and add support for argument qualifiers in {...}
parent
34b365c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
vmod.py
lib/libvmod_std/vmod.py
+6
-9
No files found.
lib/libvmod_std/vmod.py
View file @
35db7bbb
...
@@ -185,16 +185,13 @@ while True:
...
@@ -185,16 +185,13 @@ while True:
args
=
list
()
args
=
list
()
while
True
:
for
i
in
re
.
finditer
(
"([A-Z_]+)
\
s*({[^}]+})?(,|$)"
,
l
)
:
l
=
partition
(
l
,
","
)
at
=
i
.
group
(
1
)
t
=
l
[
0
]
.
strip
(
)
t
q
=
i
.
group
(
2
)
if
t
not
in
ctypes
:
if
a
t
not
in
ctypes
:
raise
Exception
(
raise
Exception
(
"Argument type '
%
s' not a valid type"
%
t
)
"Argument type '
%
s' not a valid type"
%
at
)
args
.
append
(
t
)
args
.
append
(
at
)
l
=
l
[
2
]
if
l
==
""
:
break
do_func
(
fname
,
rt_type
,
args
)
do_func
(
fname
,
rt_type
,
args
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment