Permalink
Browse files

Fixed parsing of multiple generic type arguments in function arguments.

  • Loading branch information...
1 parent b6ba6fd commit 2fb5c6835c0d195bba875d7d4739bd1cab49bf93 @fredreichbier fredreichbier committed Apr 29, 2010
Showing with 14 additions and 1 deletion.
  1. +14 −1 sphinx_ooc/desc.py
View
@@ -88,8 +88,21 @@ def parse_signature(self, sig, signode):
signode += addnodes.desc_parameterlist()
stack = [signode[-1]]
+ token_before = None
for token in ooc_paramlist_re.split(arglist):
- if not token or token == ',' or token.isspace():
+ if token_before is not None:
+ if token == ',':
+ # add commas yay.
+ token_before += token
+ continue
+ else:
+ token = token_before + token
+ print 'NOW TOKEN: %r' % token
+ token_before = None
+ if token.count('<') != token.count('>'):
+ # splitted in the middle of a <A, B, C> declaration :(
+ token_before = token
+ elif not token or token == ',' or token.isspace():
pass
else:
token = token.strip()

0 comments on commit 2fb5c68

Please sign in to comment.