1
0
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:
yuyi
2022-01-26 18:36:28 +08:00
committed by GitHub
parent d71fc0d13f
commit 291a1ffd8d
61 changed files with 958 additions and 962 deletions

View File

@@ -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

View File

@@ -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