Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
xor2003 committed Mar 8, 2023
1 parent 13d24eb commit ebf40f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions masm2c/cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ def __init__(self, context=None, outfile="", skip_output=None,
# self._isjustlabel = False
# self.__work_segment = 'ds'
#
self.__proc_queue = []
#self.__proc_queue = []
self.__proc_done = []
self.__failed = []
self.__skip_output = skip_output
#self.__skip_output = skip_output
# self.__translated = []
self._proc_addr = []
self.__used_data_offsets = set()
Expand Down Expand Up @@ -980,9 +980,9 @@ def produce_structures(self, strucs):
if len(strucs):
structures += """#pragma pack(push, 1)"""
for name, v in strucs.items():
type = 'struct' if v.gettype() == op.Struct.Type.STRUCT else 'union'
struc_type = 'struct' if v.gettype() == op.Struct.Type.STRUCT else 'union'
structures += f"""
{type} {name} {{
{struc_type} {name} {{
"""
for member in v.getdata().values():
structures += f" {member.data_type} {member.label};\n"
Expand Down Expand Up @@ -1408,10 +1408,10 @@ def STRING(self, token):
def expr(self, tree):
self._indirection = tree.indirection

single = len(tree.children) == 1
origexpr = tree.children[0]
while isinstance(origexpr, list) and origexpr:
origexpr = origexpr[0]
single = len(tree.children) == 1
self._isjustlabel = single and ((isinstance(origexpr, lark.Token) and origexpr.type == LABEL)
or (isinstance(origexpr, lark.Token) and origexpr.type == SQEXPR
and isinstance(origexpr.children,
Expand Down

0 comments on commit ebf40f8

Please sign in to comment.