toml: remove math import (used only for math.max and math.max_u32)

pull/14008/head
Delyan Angelov 2022-04-11 10:21:14 +03:00
parent 1938bc48e7
commit e4dfffd70b
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 2 additions and 3 deletions

View File

@ -3,14 +3,13 @@
// that can be found in the LICENSE file.
module scanner
import math
import toml.input
import toml.token
import toml.util
pub const (
digit_extras = [`_`, `.`, `x`, `o`, `b`, `e`, `E`]
end_of_text = math.max_u32
end_of_text = 4294967295
)
// Scanner contains the necessary fields for the state of the scan process.
@ -346,7 +345,7 @@ fn (mut s Scanner) new_token(kind token.Kind, lit string, len int) token.Token {
return token.Token{
kind: kind
lit: lit
col: math.max(1, col)
col: if col < 1 { 1 } else { col }
line_nr: s.line_nr + 1
pos: s.pos - s.header_len - len + 1
len: len