mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
token: rename Position to Pos, rename position() to pos() (#13279)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
module token
|
||||
|
||||
// Position represents a position in a TOML document.
|
||||
pub struct Position {
|
||||
pub struct Pos {
|
||||
pub:
|
||||
len int // length of the literal in the source
|
||||
line_nr int // the line number in the source where the token occured
|
||||
@@ -42,8 +42,8 @@ pub enum Kind {
|
||||
}
|
||||
|
||||
[inline]
|
||||
pub fn (tok &Token) position() Position {
|
||||
return Position{
|
||||
pub fn (tok &Token) pos() Pos {
|
||||
return Pos{
|
||||
len: tok.len
|
||||
line_nr: tok.line_nr - 1
|
||||
pos: tok.pos
|
||||
|
||||
Reference in New Issue
Block a user