Skip to content

Commit

Permalink
Remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
brunojppb committed May 20, 2024
1 parent ef87d08 commit 7aa7bc1
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions md_parser/src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ impl<'a> Lexer<'a> {
match c {
Some(c) => {
if c.is_ascii() {
println!(
"symbol={} contains={}",
c as char,
SYMBOLS.contains(c as char)
);
c.is_ascii_digit() || SYMBOLS.contains(c as char)
} else {
false
Expand All @@ -86,20 +81,11 @@ impl<'a> Lexer<'a> {
let start_offset = self.current_byte_offset - 1;
let mut end_byte_offset = start_offset;
while !self.is_at_end() && !self.is_token(self.peek()) {
let value = self.advance();
println!(
"Advancing a byte value={:#?} peek={:#?}",
value.map(|c| c as char),
self.peek().map(|c| c as char)
);
self.advance();
end_byte_offset += 1;
}

let value = &self.source[start_offset..end_byte_offset + 1];
println!(
"value={} start={} end={}",
value, start_offset, end_byte_offset
);

self.add_token(Token::Text(value));
}
Expand Down

0 comments on commit 7aa7bc1

Please sign in to comment.