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
@@ -47,7 +47,7 @@ _ = header
|
||||
if line.contains('@if ') {
|
||||
s.writeln(STR_END)
|
||||
pos := line.index('@if')
|
||||
s.writeln('if ' + line.right(pos + 4) + '{')
|
||||
s.writeln('if ' + line[pos + 4..] + '{')
|
||||
s.writeln(STR_START)
|
||||
}
|
||||
else if line.contains('@end') {
|
||||
@@ -63,7 +63,7 @@ _ = header
|
||||
else if line.contains('@for') {
|
||||
s.writeln(STR_END)
|
||||
pos := line.index('@for')
|
||||
s.writeln('for ' + line.right(pos + 4) + '{')
|
||||
s.writeln('for ' + line[pos + 4..] + '{')
|
||||
s.writeln(STR_START)
|
||||
}
|
||||
else if !in_css && line.contains('.') && line.ends_with('{') {
|
||||
|
||||
Reference in New Issue
Block a user