Files
tidewall/tools/parse_all.gd
T
claudeandClaude Opus 5.5 a4b0c43cf0 F1: Project skeleton and pinned engine
Add the Godot 4.7.2 project, src/ module layout, LFS rules, licences, CLAUDE.md
and the devlog. tools/godot.sh runs the repo-local engine, headless by default, and
keeps engine data inside the repo. The engine version and SHA-512 sums are recorded
in tools/. make check verifies the engine, checks binaries and parses every script.

Closes #1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:12:59 -05:00

30 lines
1005 B
GDScript

## Compiles every project script and exits non-zero if any fails.
## Run with: tools/godot.sh --script res://tools/parse_all.gd
extends SceneTree
const SKIP_DIRS: Array[String] = ["res://tools/godot", "res://test/fixtures"]
func _initialize() -> void:
var paths: Array[String] = []
_collect("res://", paths)
var failed: int = 0
for path: String in paths:
var script: GDScript = load(path) as GDScript
if script == null or not script.can_instantiate():
printerr("PARSE FAIL: %s" % path)
failed += 1
print("Parsed %d scripts, %d failed." % [paths.size(), failed])
quit(1 if failed > 0 or paths.is_empty() else 0)
func _collect(dir_path: String, out: Array[String]) -> void:
if dir_path.trim_suffix("/") in SKIP_DIRS:
return
for name: String in DirAccess.get_files_at(dir_path):
if name.ends_with(".gd"):
out.append(dir_path.path_join(name))
for name: String in DirAccess.get_directories_at(dir_path):
if not name.begins_with("."):
_collect(dir_path.path_join(name), out)