also replace 'println' statements in the runtime with panicprint

pull/122/head
Andrew LeFevre 4 years ago committed by Daniel Martí
parent 1bff68d8c8
commit dc02bc9f6b

@ -21,12 +21,17 @@ func addRuntimeAPI(filename string, file *ast.File) {
return true
}
if id.Name == "print" {
switch id.Name {
case "print":
id.Name = "panicprint"
return false
case "println":
id.Name = "panicprint"
call.Args = append(call.Args, &ast.BasicLit{Kind: token.STRING, Value: `"\n"`})
return false
default:
return true
}
return true
}
switch filename {

Loading…
Cancel
Save