tiny C backend for a much faster REPL
This commit is contained in:
parent
227b76c342
commit
f530bbd631
12 changed files with 208 additions and 53 deletions
|
|
@ -67,10 +67,12 @@ const
|
|||
|
||||
type
|
||||
TFormatStr* = string # later we may change it to CString for better
|
||||
# performance of the code generator (assignments copy the format strings
|
||||
# performance of the code generator (assignments
|
||||
# copy the format strings
|
||||
# though it is not necessary)
|
||||
PRope* = ref TRope
|
||||
TRope*{.acyclic.} = object of TObject # the empty rope is represented by nil to safe space
|
||||
TRope*{.acyclic.} = object of TObject # the empty rope is represented
|
||||
# by nil to safe space
|
||||
left*, right*: PRope
|
||||
length*: int
|
||||
data*: string # != nil if a leaf
|
||||
|
|
@ -405,4 +407,4 @@ proc writeRopeIfNotEqual(r: PRope, filename: string): bool =
|
|||
else:
|
||||
result = false
|
||||
|
||||
new(N) # init dummy node for splay algorithm
|
||||
new(N) # init dummy node for splay algorithm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue