Handle function pointer parameters where the return value is a reference
- Fixes #17
This commit is contained in:
@@ -1503,7 +1503,6 @@ class CxxParser:
|
||||
|
||||
param = self._parse_parameter(None, Parameter)
|
||||
params.append(param)
|
||||
|
||||
tok = self._next_token_must_be(",", ")")
|
||||
if tok.value == ")":
|
||||
break
|
||||
@@ -1812,6 +1811,11 @@ class CxxParser:
|
||||
else:
|
||||
dtype = MoveReference(dtype)
|
||||
|
||||
# peek at the next token and see if it's a paren. If so, it might
|
||||
# be a nasty function pointer
|
||||
if self.lex.token_peek_if("("):
|
||||
dtype = self._parse_cv_ptr(dtype, nonptr_fn)
|
||||
|
||||
return dtype
|
||||
|
||||
# Applies to variables and return values
|
||||
|
||||
Reference in New Issue
Block a user