summaryrefslogtreecommitdiff
path: root/src/stages/syntactic.rs
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2025-03-25 11:55:09 +1300
committerBen Bridle <ben@derelict.engineering>2025-03-25 11:55:09 +1300
commiteffc9ac938a8f582ebdec541990345f74b0abf65 (patch)
treee3b172dac2a6d4cc45b6bc2191c4865cc01064d8 /src/stages/syntactic.rs
parentfa6e20f118542cc8852590a5215e98bf585164db (diff)
downloadbedrock-asm-effc9ac938a8f582ebdec541990345f74b0abf65.zip
Recognise : as a valid symbol
When parsing a standalone : character, the following characters were also being consumed and appended instead of the expected behaviour where the current token should end as soon as a : is encountered.
Diffstat (limited to 'src/stages/syntactic.rs')
-rw-r--r--src/stages/syntactic.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stages/syntactic.rs b/src/stages/syntactic.rs
index 960a4ed..ff3a65a 100644
--- a/src/stages/syntactic.rs
+++ b/src/stages/syntactic.rs
@@ -117,6 +117,9 @@ fn parse_syntactic_from_tokeniser(mut t: Tokeniser) -> Result<Vec<Tracked<Syntac
Err(_) => err!(SyntacticError::InvalidPaddingValue),
}
},
+ ':' => {
+ SyntacticToken::Invocation(String::from(':'))
+ }
c => {
let token = format!("{c}{}", t.eat_token());
if let Ok(value) = token.parse::<Value>() {