diff options
| author | Ben Bridle <bridle.benjamin@gmail.com> | 2025-11-26 19:13:45 +1300 |
|---|---|---|
| committer | Ben Bridle <bridle.benjamin@gmail.com> | 2025-11-26 19:22:13 +1300 |
| commit | 80ea0d650e3d8f56e43df21f1293b4ddccb89203 (patch) | |
| tree | 1dcd5a485dee43eb6844f6c3c1799f06690af992 /src | |
| parent | 20a029a3215d1e9816812c3484f65164b8faa613 (diff) | |
| download | torque-asm-80ea0d650e3d8f56e43df21f1293b4ddccb89203.zip | |
Remove semantic::ListLiteral::Invocation
This variant was never needed or constructed, I would have added it to
match the invocation variants of the block and integer tokens (which do
have a use).
Diffstat (limited to 'src')
| -rw-r--r-- | src/stages/compiler.rs | 3 | ||||
| -rw-r--r-- | src/stages/intermediate.rs | 16 | ||||
| -rw-r--r-- | src/stages/semantic_tokens.rs | 4 |
3 files changed, 0 insertions, 23 deletions
diff --git a/src/stages/compiler.rs b/src/stages/compiler.rs index b4680c2..bc86589 100644 --- a/src/stages/compiler.rs +++ b/src/stages/compiler.rs @@ -252,9 +252,6 @@ impl SymbolParser { fn parse_list_token(&mut self, token: &ListToken, source: &SourceSpan) { match &token { - ListToken::Invocation(invocation) => { - self.parse_invocation(&invocation, source) - } ListToken::ListLiteral(integers) => { for integer in integers { self.parse_integer_token(&integer, source) diff --git a/src/stages/intermediate.rs b/src/stages/intermediate.rs index 8cabe26..3dfa0fd 100644 --- a/src/stages/intermediate.rs +++ b/src/stages/intermediate.rs @@ -314,9 +314,6 @@ impl IntermediateParser { } Some(Tracked::from(integers, source.clone())) } - ListToken::Invocation(invocation) => { - self.parse_list_invocation(&invocation, source) - } } } @@ -348,19 +345,6 @@ impl IntermediateParser { } } - fn parse_list_invocation(&mut self, invocation: &Invocation, source: &SourceSpan) -> Option<Tracked<IntermediateList>> { - let result = self.parse_invocation(invocation, source)?; - let source = result.source; - match result.value { - IntermediateValue::List(literal) => Some(Tracked::from(literal, source)), - IntermediateValue::Integer(_) | IntermediateValue::Block(_) => { - let error = IntermediateError::ExpectedList; - self.errors.push(Tracked::from(error, source)); - None - } - } - } - fn parse_invocation(&mut self, invocation: &Invocation, source: &SourceSpan) -> Option<Tracked<IntermediateValue>> { let received_count = invocation.arguments.len(); let signature = SymbolSignature { diff --git a/src/stages/semantic_tokens.rs b/src/stages/semantic_tokens.rs index 69c6c98..89a5b37 100644 --- a/src/stages/semantic_tokens.rs +++ b/src/stages/semantic_tokens.rs @@ -84,7 +84,6 @@ pub enum BlockToken { pub enum ListToken { StringLiteral(StringLiteral), ListLiteral(Vec<Tracked<IntegerToken>>), - Invocation(Invocation), } #[derive(Clone)] @@ -353,9 +352,6 @@ fn print_list_token(i: usize, string: &ListToken) { print_integer_token(i+1, integer); } } - ListToken::Invocation(invocation) => { - print_invocation(i, invocation) - } } } |
