From 98e28e5d30ce90a49defd1d4ee8f5b4467f3a11c Mon Sep 17 00:00:00 2001 From: Joe Stanley Date: Tue, 19 Apr 2022 09:48:02 -0700 Subject: [PATCH] updated transform FunctionBlock to use access rather than abstract --- blark/transform.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blark/transform.py b/blark/transform.py index 379c4a1..d74fcfa 100644 --- a/blark/transform.py +++ b/blark/transform.py @@ -1806,7 +1806,7 @@ def from_lark( *declarations, body, _ = args return FunctionBlock( name=derived_name, - access=access is not None, + access=access, extends=extends, implements=implements, declarations=list(declarations), @@ -1814,8 +1814,8 @@ def from_lark( ) def __str__(self) -> str: - abstract = "ABSTRACT " if self.abstract else "" - header = f"FUNCTION_BLOCK {abstract}{self.name}" + access_and_name = join_if(self.access, " ", self.name) + header = f"FUNCTION_BLOCK {access_and_name}" header = join_if(header, " ", self.implements) header = join_if(header, " ", self.extends) return "\n".join(