scanner: remove debug_tokens (#8078)
parent
ae592299dc
commit
4cd50ed566
|
@ -28,7 +28,6 @@ pub mut:
|
||||||
is_inter_start bool // for hacky string interpolation TODO simplify
|
is_inter_start bool // for hacky string interpolation TODO simplify
|
||||||
is_inter_end bool
|
is_inter_end bool
|
||||||
is_enclosed_inter bool
|
is_enclosed_inter bool
|
||||||
is_debug bool
|
|
||||||
line_comment string
|
line_comment string
|
||||||
// prev_tok TokenKind
|
// prev_tok TokenKind
|
||||||
is_started bool
|
is_started bool
|
||||||
|
@ -1175,29 +1174,6 @@ fn (s &Scanner) expect(want string, start_pos int) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut s Scanner) debug_tokens() {
|
|
||||||
s.pos = 0
|
|
||||||
s.is_started = false
|
|
||||||
s.is_debug = true
|
|
||||||
fname := s.file_path.all_after_last(os.path_separator)
|
|
||||||
println('\n===DEBUG TOKENS $fname===')
|
|
||||||
for {
|
|
||||||
tok := s.scan()
|
|
||||||
tok_kind := tok.kind
|
|
||||||
lit := tok.lit
|
|
||||||
print(tok_kind.str())
|
|
||||||
if lit != '' {
|
|
||||||
println(' `$lit`')
|
|
||||||
} else {
|
|
||||||
println('')
|
|
||||||
}
|
|
||||||
if tok_kind == .eof {
|
|
||||||
println('============ END OF DEBUG TOKENS ==================')
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[inline]
|
[inline]
|
||||||
fn (mut s Scanner) ignore_line() {
|
fn (mut s Scanner) ignore_line() {
|
||||||
s.eat_to_end_of_line()
|
s.eat_to_end_of_line()
|
||||||
|
|
Loading…
Reference in New Issue