1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 00:42:45 +01:00

Codechange: Add filename and line number to errors/warnings of the squirrel-exporters. (#14031)

This commit is contained in:
frosch
2025-04-18 19:43:32 +02:00
committed by GitHub
parent 50252cb5df
commit af14809697
2 changed files with 6 additions and 6 deletions

View File

@@ -80,7 +80,7 @@ BEGIN {
/^( *)class/ {
if (cls_level == 0) {
if (api_selected == "") {
print "Class '"$2"' has no @api. It won't be published to any API." > "/dev/stderr"
printf "%s:%d: %s\n", FILENAME, NR, "Class '"$2"' has no @api. It won't be published to any API." > "/dev/stderr"
api_selected = "false"
}
public = "false"
@@ -105,7 +105,7 @@ BEGIN {
}
api_selected = ""
} else {
print "Classes nested too deep" > "/dev/stderr"
printf "%s:%d: %s\n", FILENAME, NR, "Classes nested too deep" > "/dev/stderr"
exit 1
}
cls_level++
@@ -279,7 +279,7 @@ BEGIN {
}
if (match($0, "~")) {
if (api_selected != "") {
print "Destructor for '"cls"' has @api. Tag ignored." > "/dev/stderr"
printf "%s:%d: %s\n", FILENAME, NR, "Destructor for '"cls"' has @api. Tag ignored." > "/dev/stderr"
api_selected = ""
}
next