mirror of
https://github.com/widberg/bff
synced 2026-08-23 14:26:03 -04:00
Sort CPS scripts
This commit is contained in:
parent
a0feca6e62
commit
0a2d2d917d
3 changed files with 18 additions and 6 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue