koch boot compiler with orc (#20467)
* koch boot compiler with orc * use orc * workaround bugs * move it * move the data
This commit is contained in:
parent
3e43ea3384
commit
ae050b05e9
5 changed files with 6 additions and 11 deletions
|
|
@ -55,7 +55,7 @@ template `[]=`*(s: string; i: int; val: char) = arrPut(s, i, val)
|
|||
template `^^`(s, i: untyped): untyped =
|
||||
(when i is BackwardsIndex: s.len - int(i) else: int(i))
|
||||
|
||||
template spliceImpl(s, a, L, b: untyped): untyped =
|
||||
template spliceImpl(s, a, L, b: typed): untyped =
|
||||
# make room for additional elements or cut:
|
||||
var shift = b.len - max(0,L) # ignore negative slice size
|
||||
var newLen = s.len + shift
|
||||
|
|
@ -147,7 +147,6 @@ proc `[]=`*[T; U, V: Ordinal](s: var seq[T], x: HSlice[U, V], b: openArray[T]) =
|
|||
var s = @"abcdefgh"
|
||||
s[1 .. ^2] = @"xyz"
|
||||
assert s == @"axyzh"
|
||||
|
||||
let a = s ^^ x.a
|
||||
let L = (s ^^ x.b) - a + 1
|
||||
if L == b.len:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue