diff options
author | Ben Bridle <ben@derelict.engineering> | 2025-03-25 11:46:28 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2025-03-25 11:46:28 +1300 |
commit | 0f4e890ec355c96be16eb4de68b961838d8e4750 (patch) | |
tree | 51c8bf0e930b996d51bf419f9cd67281cbd18021 /src/stages/compiler.rs | |
parent | 34904ce10610d8b08126b6a1cd730878348f1083 (diff) | |
download | bedrock-asm-0f4e890ec355c96be16eb4de68b961838d8e4750.zip |
Fix misleading variable name
This stage previously operated on semantic tokens, but was later
changed to operate on syntactic tokens.
Diffstat (limited to 'src/stages/compiler.rs')
-rw-r--r-- | src/stages/compiler.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stages/compiler.rs b/src/stages/compiler.rs index 7dad5e4..5ec0652 100644 --- a/src/stages/compiler.rs +++ b/src/stages/compiler.rs @@ -35,7 +35,7 @@ pub fn push_code(compilation: &mut String, source_file: &SourceFile) { } -// Extract symbol definitions from a list of semantic tokens. +// Extract symbol definitions from a list of syntactic tokens. pub struct SymbolParser { pub symbols: Vec<Symbol>, } @@ -54,8 +54,8 @@ impl SymbolParser { self.symbols.push(Symbol { name, namespace, source, role }); } - pub fn parse(mut self, semantic: &[Tracked<SyntacticToken>]) -> Vec<Symbol> { - for token in semantic { + pub fn parse(mut self, syntactic: &[Tracked<SyntacticToken>]) -> Vec<Symbol> { + for token in syntactic { match &token.value { SyntacticToken::MacroDefinition(definition) => { self.record_symbol( |