mirror of
https://github.com/irmen/prog8.git
synced 2026-04-21 17:16:33 +00:00
tweak codegen of inline sub
This commit is contained in:
@@ -86,8 +86,7 @@ fun printAst(root: PtNode, output: (text: String) -> Unit) {
|
||||
}
|
||||
is PtSub -> {
|
||||
val params = if (node.parameters.isEmpty()) "" else "...TODO ${node.parameters.size} PARAMS..."
|
||||
var str = if(node.inline) "inline " else ""
|
||||
str += "sub ${node.name}($params) "
|
||||
var str = "sub ${node.name}($params) "
|
||||
if(node.returntype!=null)
|
||||
str += "-> ${node.returntype.name.lowercase()}"
|
||||
str
|
||||
|
||||
@@ -26,7 +26,6 @@ class PtSub(
|
||||
name: String,
|
||||
val parameters: List<PtSubroutineParameter>,
|
||||
val returntype: DataType?,
|
||||
val inline: Boolean,
|
||||
position: Position
|
||||
) : PtNamedNode(name, position), IPtSubroutine {
|
||||
override fun printProperties() {
|
||||
|
||||
Reference in New Issue
Block a user