toml: remove unused enum (#12304)

pull/12310/head
Larpon 2021-10-26 15:58:58 +02:00 committed by GitHub
parent 9a3967bd7d
commit c526752419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 12 deletions

View File

@ -19,25 +19,18 @@ pub:
config Config config Config
text string // the input TOML text text string // the input TOML text
mut: mut:
col int // current column number (x coordinate) col int // current column number (x coordinate)
line_nr int = 1 // current line number (y coordinate) line_nr int = 1 // current line number (y coordinate)
pos int // current flat/index position in the `text` field pos int // current flat/index position in the `text` field
mode Mode // sub-mode of the scanner
} }
// State is a read-only copy of the scanner's internal state. // State is a read-only copy of the scanner's internal state.
// See also `Scanner.state()`. // See also `Scanner.state()`.
pub struct State { pub struct State {
pub: pub:
col int // current column number (x coordinate) col int // current column number (x coordinate)
line_nr int = 1 // current line number (y coordinate) line_nr int = 1 // current line number (y coordinate)
pos int // current flat/index position in the `text` field pos int // current flat/index position in the `text` field
mode Mode // sub-mode of the scanner
}
enum Mode {
normal
inside_string
} }
// Config is used to configure a Scanner instance. // Config is used to configure a Scanner instance.
@ -610,6 +603,5 @@ pub fn (s Scanner) state() State {
col: s.col col: s.col
line_nr: s.line_nr line_nr: s.line_nr
pos: s.pos pos: s.pos
mode: s.mode
} }
} }