Skip to content

Commit

Permalink
updated transform FunctionBlock to use access rather than abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeStanleySEL committed Apr 19, 2022
1 parent 47f41e3 commit 98e28e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blark/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1806,16 +1806,16 @@ 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),
body=body,
)

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(
Expand Down

0 comments on commit 98e28e5

Please sign in to comment.