1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker/parser: allow for fixed array with sizes defined with a const

This commit is contained in:
Delyan Angelov
2020-04-10 22:00:54 +03:00
parent 514d989a27
commit 217e6f3b8e
9 changed files with 99 additions and 26 deletions

View File

@@ -10,6 +10,10 @@ pub:
len int // length of the literal in the source
}
pub fn (pos Position) str() string {
return 'Position{ line_nr: $pos.line_nr, pos: $pos.pos, len: $pos.len }'
}
[inline]
pub fn (tok &Token) position() Position {
return Position{