forked from github/verilator
Apply 'make format'
This commit is contained in:
parent
9949a6cd17
commit
12093e6939
15
src/astgen
15
src/astgen
@ -910,7 +910,9 @@ def write_op_checks(filename):
|
|||||||
indent = ""
|
indent = ""
|
||||||
|
|
||||||
def emitBlock(pattern, **fmt):
|
def emitBlock(pattern, **fmt):
|
||||||
fh.write(textwrap.indent(textwrap.dedent(pattern), indent).format(**fmt))
|
fh.write(
|
||||||
|
textwrap.indent(textwrap.dedent(pattern),
|
||||||
|
indent).format(**fmt))
|
||||||
|
|
||||||
for node in SortedNodes:
|
for node in SortedNodes:
|
||||||
if not node.isLeaf:
|
if not node.isLeaf:
|
||||||
@ -924,7 +926,7 @@ def write_op_checks(filename):
|
|||||||
indent = " "
|
indent = " "
|
||||||
for n in range(1, 5):
|
for n in range(1, 5):
|
||||||
op = node.getOp(n)
|
op = node.getOp(n)
|
||||||
emitBlock("// Checking op{n}p\n",n=n)
|
emitBlock("// Checking op{n}p\n", n=n)
|
||||||
if op:
|
if op:
|
||||||
name, monad, kind = op
|
name, monad, kind = op
|
||||||
if not monad:
|
if not monad:
|
||||||
@ -967,14 +969,17 @@ def write_op_checks(filename):
|
|||||||
nodeName=node.name,
|
nodeName=node.name,
|
||||||
opName=name,
|
opName=name,
|
||||||
kind=kind,
|
kind=kind,
|
||||||
next = "VN_AS(opp->nextp(), {kind})".format(kind=kind) if kind != "Node" else "opp->nextp()"
|
next="VN_AS(opp->nextp(), {kind})".format(
|
||||||
)
|
kind=kind)
|
||||||
|
if kind != "Node" else "opp->nextp()")
|
||||||
else:
|
else:
|
||||||
sys.exit("Unknown operand type")
|
sys.exit("Unknown operand type")
|
||||||
else:
|
else:
|
||||||
emitBlock('''\
|
emitBlock('''\
|
||||||
UASSERT_OBJ(!currp->op{n}p(), currp, "Ast{nodeName} does not use op{n}p()");
|
UASSERT_OBJ(!currp->op{n}p(), currp, "Ast{nodeName} does not use op{n}p()");
|
||||||
''', n=n, nodeName=node.name)
|
''',
|
||||||
|
n=n,
|
||||||
|
nodeName=node.name)
|
||||||
indent = ""
|
indent = ""
|
||||||
emitBlock('''\
|
emitBlock('''\
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user