pyosys generator: ignore attributes

* this allows log_error, log_file_error and log_cmd_error which are all
  marked [[noreturn]] to be supported
This commit is contained in:
George Rennie 2024-11-04 14:08:57 +01:00
parent b2d78589e2
commit de728c9824
1 changed files with 5 additions and 0 deletions

View File

@ -1268,6 +1268,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:]