mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 23:29:55 +00:00
check
This commit is contained in:
parent
6218c1c00b
commit
266f6ab919
@ -103,6 +103,14 @@ class PtProgram(
|
||||
|
||||
children.forEach { transformBinExprToRPN(it, this) }
|
||||
binaryExpressionsAreRPN = true
|
||||
|
||||
// extra check to see that all PtBinaryExpressions have been transformed
|
||||
fun binExprCheck(node: PtNode) {
|
||||
if(node is PtBinaryExpression)
|
||||
throw IllegalArgumentException("still got binexpr $node ${node.position}")
|
||||
node.children.forEach { binExprCheck(it) }
|
||||
}
|
||||
binExprCheck(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user