scanner: remove debug_tokens (#8078)

pull/8082/head
zakuro 2021-01-13 16:33:37 +09:00 committed by GitHub
parent ae592299dc
commit 4cd50ed566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 24 deletions

View File

@ -28,7 +28,6 @@ pub mut:
is_inter_start bool // for hacky string interpolation TODO simplify
is_inter_end bool
is_enclosed_inter bool
is_debug bool
line_comment string
// prev_tok TokenKind
is_started bool
@ -1175,29 +1174,6 @@ fn (s &Scanner) expect(want string, start_pos int) bool {
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]
fn (mut s Scanner) ignore_line() {
s.eat_to_end_of_line()