Sort CPS scripts

This commit is contained in:
widberg 2026-03-08 18:23:59 -04:00
parent a0feca6e62
commit 0a2d2d917d
3 changed files with 18 additions and 6 deletions

View file

@ -16,12 +16,12 @@ fn collect_cps_names(cps: &Cps, name_context: &NameContext) -> HashSet<Name> {
for (path, script) in &cps.tscs {
if let Some(stem) = path.file_stem().and_then(|stem| stem.to_str()) {
names.insert(name_context.parse_or_hash_name(stem));
names.insert(name_context.parse_i32_or_hash_name(stem));
}
for line in script.lines() {
if let Some(command_name) = line.split_whitespace().next() {
if !command_name.is_empty() {
names.insert(name_context.parse_or_hash_name(command_name));
names.insert(name_context.parse_i32_or_hash_name(command_name));
}
}
}