Skip to content

Commit

Permalink
Improved property signature parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsajip committed Jan 23, 2020
1 parent 92ef213 commit e14e2e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinx_csharp/csharp.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
r'^((?:(?:' + MODIFIERS_RE +
r')\s+)*)([^\s]+\s+)*([^\s<]+)\s*(<[^\(]+>)?\s*\((.*)\)$')
PROP_SIG_RE = re.compile(
r'^([^\s]+\s+)*([^\s]+)\s+([^\s]+)\s*\{\s*(get;)?\s*(set;)?\s*\}$')
r'^(\w+\s+)*([\w.\[\]]+(<.*>)?)\s+(\w+)\s*\{\s*(get;)?\s*(set;)?\s*\}$')
IDXR_SIG_RE = re.compile(
r'^((?:(?:' + MODIFIERS_RE +
r')\s+)*)([^\s]+)\s*this\s*\[\s*((?:[^\s]+)\s+(?:[^\s]+)' +
Expand Down Expand Up @@ -91,7 +91,7 @@ def parse_property_signature(sig):
else:
modifiers = []
groups = groups[1:]
typ, name, getter, setter = groups
typ, _, name, getter, setter = groups
return (modifiers, typ, name, getter is not None, setter is not None)


Expand Down

0 comments on commit e14e2e3

Please sign in to comment.