Merge pull request #4701 from georgerennie/george/pyosys_noreturn_attrs

pyosys generator: ignore attributes
This commit is contained in:
Emil J 2024-11-20 13:33:33 +01:00 committed by GitHub
commit da8c8b4fd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -1273,6 +1273,11 @@ class WFunction:
func.duplicate = False
func.namespace = namespace
str_def = str_def.replace("operator ","operator")
# remove attributes from the start
if str.startswith(str_def, "[[") and "]]" in str_def:
str_def = str_def[str_def.find("]]")+2:]
if str.startswith(str_def, "static "):
func.is_static = True
str_def = str_def[7:]