Show More
@@ -2203,6 +2203,8 b' def _parsealiasdecl(decl):' | |||
|
2203 | 2203 | ('foo($1, $2', None, None, 'at 10: unexpected token: end') |
|
2204 | 2204 | >>> _parsealiasdecl('foo("string') |
|
2205 | 2205 | ('foo("string', None, None, 'at 5: unterminated string') |
|
2206 | >>> _parsealiasdecl('foo($1, $2, $1)') | |
|
2207 | ('foo', None, None, 'argument names collide with each other') | |
|
2206 | 2208 | """ |
|
2207 | 2209 | p = parser.parser(_tokenizealias, elements) |
|
2208 | 2210 | try: |
@@ -2227,6 +2229,9 b' def _parsealiasdecl(decl):' | |||
|
2227 | 2229 | if not isvalidsymbol(arg): |
|
2228 | 2230 | return (decl, None, None, _("invalid argument list")) |
|
2229 | 2231 | args.append(getsymbol(arg)) |
|
2232 | if len(args) != len(set(args)): | |
|
2233 | return (name, None, None, | |
|
2234 | _("argument names collide with each other")) | |
|
2230 | 2235 | return (name, ('func', ('symbol', name)), args, None) |
|
2231 | 2236 | |
|
2232 | 2237 | return (decl, None, None, _("invalid format")) |
General Comments 0
You need to be logged in to leave comments.
Login now