mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler/vlib: replace substr/left/right with [start..end] everywhere
This commit is contained in:
committed by
Alexander Medvednikov
parent
ed55826686
commit
59378dce46
@@ -8,7 +8,7 @@ fn (p mut Parser) in_optimization(typ string, ph int) {
|
||||
p.check(.lsbr)
|
||||
mut i := 0
|
||||
// Get `a` expr value (can be a string literal, not a variable)
|
||||
expr := p.cgen.cur_line.right(ph)
|
||||
expr := p.cgen.cur_line[ph..]
|
||||
is_str := typ == 'string'
|
||||
//println('!! $p.expr_var.name => $name ($typ)')
|
||||
for p.tok != .rsbr && p.tok != .eof {
|
||||
|
||||
Reference in New Issue
Block a user