Fix the span for words

This commit is contained in:
Karol Belina 2021-06-12 20:33:17 +02:00
parent 68b73cf8b5
commit 9a615cf088
2 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View File

@ -2,4 +2,6 @@
*.swp
*.bin
*.rom
*.hex
*.chr
.DS_Store

View File

@ -205,9 +205,9 @@ fn tokenize(word: &[Spanned<char>]) -> Result<(Spanned<Token>, Vec<Warning>), Er
}
}
}
Spanned { node: '"', span } => {
Spanned { node: '"', .. } => {
return Ok((
Token::RawWord(to_string(&word[1..])).spanning(span),
Token::RawWord(to_string(&word[1..])).spanning(to_span(word).unwrap()),
Vec::new(),
));
}