added support for generic types
"<" and ">" in the type reference are now recognised
This commit is contained in:
parent
3307cb7377
commit
153ede2eda
1 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ def is_line_field_declaration(line:str) -> bool:
|
|||
"""
|
||||
if "public" not in line and "private" not in line and "protected" not in line:
|
||||
return
|
||||
field_pattern = re.compile(r'^\s*(public|private|protected|\s)*\s*(static|final|\s)*\s*(\w[\w\d]*)\s+(\w[\w\d]*)\s*(=\s*[^;]*)?;')
|
||||
field_pattern = re.compile(r'^\s*(public|private|protected|\s)*\s*(static|final|\s)*\s*(\w[\w\d,<>\s]*)\s+(\w[\w\d]*)\s*(=\s*[^;]*)?;')
|
||||
match = field_pattern.match(line.strip())
|
||||
return match is not None
|
||||
|
||||
|
@ -69,7 +69,7 @@ def get_field_visibility(line):
|
|||
"""
|
||||
Checks if the line is a field declaration and returns its visibility (+, -, or #).
|
||||
"""
|
||||
field_pattern = re.compile(r'^\s*(public|private|protected|\s)*\s*(static|final|\s)*\s*(\w[\w\d]*)\s+(\w[\w\d]*)\s*(=\s*[^;]*)?;')
|
||||
field_pattern = re.compile(r'^\s*(public|private|protected|\s)*\s*(static|final|\s)*\s*(\w[\w\d,<>\s]*)\s+(\w[\w\d]*)\s*(=\s*[^;]*)?;')
|
||||
match = field_pattern.match(line.strip())
|
||||
if match:
|
||||
# Check for the access modifier in the line and return the corresponding symbol
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue