Preserve numeric underscore and hexadecimal notation through formatting.

This commit is contained in:
KtorZ
2023-06-08 16:37:20 +02:00
parent 0b7682306f
commit 6bd8e94e17
4 changed files with 92 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ pub fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = ParseError> {
.at_least(1)
.at_most(3)
.separated_by(just("_"))
.at_least(1)
.at_least(2)
.flatten()
.collect::<String>()
.map(|value| Token::Int {