mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
scanner: remove debug_tokens (#8078)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user