summaryrefslogtreecommitdiff
path: root/oryxc/src/lexer.rs
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2026-03-04 01:34:59 +0100
committerThomas Voss <mail@thomasvoss.com> 2026-03-04 01:34:59 +0100
commit5a3bb38d18da212d0ad18e406a602bf99e7631ee (patch)
tree383055e0ecfe313869fd16f618321ce98dbd3518 /oryxc/src/lexer.rs
parent16bf53da8c17dbf231fe3e4077ac873fbedc8ee9 (diff)
Minor style changes
Diffstat (limited to 'oryxc/src/lexer.rs')
-rw-r--r--oryxc/src/lexer.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/oryxc/src/lexer.rs b/oryxc/src/lexer.rs
index c82cd2c..09e2881 100644
--- a/oryxc/src/lexer.rs
+++ b/oryxc/src/lexer.rs
@@ -437,15 +437,14 @@ fn tokenize_string<'a>(ctx: &mut LexerContext<'a>) -> Result<Token, OryxError> {
let i = ctx.pos_b;
loop {
- match ctx.next() {
- Some(c) if c == '"' => break,
- Some(_) => {},
- None => {
- return Err(OryxError::new(
- (i, ctx.pos_a),
- "unterminated string literal",
- ));
- },
+ let Some(c) = ctx.next() else {
+ return Err(OryxError::new(
+ (i, ctx.pos_a),
+ "unterminated string literal",
+ ));
+ };
+ if c == '"' {
+ break;
}
}
return Ok(Token {