c2nim compiles again
This commit is contained in:
parent
86e1408a39
commit
4591ab0f12
3 changed files with 12 additions and 4 deletions
|
|
@ -62,7 +62,7 @@ proc newParserOptions*(): PParserOptions =
|
||||||
result.flags = {}
|
result.flags = {}
|
||||||
result.dynlibSym = ""
|
result.dynlibSym = ""
|
||||||
result.header = ""
|
result.header = ""
|
||||||
result.toMangle = newStringTable()
|
result.toMangle = newStringTable(modeCaseSensitive)
|
||||||
|
|
||||||
proc setOption*(parserOptions: PParserOptions, key: string, val=""): bool =
|
proc setOption*(parserOptions: PParserOptions, key: string, val=""): bool =
|
||||||
result = true
|
result = true
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,6 @@ proc `$`*[A, B](t: PHashTable[A, B]): string =
|
||||||
result.add($val)
|
result.add($val)
|
||||||
result.add("}")
|
result.add("}")
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------ count tables -------------------------------
|
# ------------------------------ count tables -------------------------------
|
||||||
|
|
||||||
const
|
const
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,24 @@
|
||||||
## be manipulated directly for efficiency.
|
## be manipulated directly for efficiency.
|
||||||
|
|
||||||
type
|
type
|
||||||
TDoublyLinkedNode[T] {.pure, final.} = object
|
TDoublyLinkedNode*[T] {.pure,
|
||||||
|
final.} = object ## a node a doubly linked list consists of
|
||||||
next*, prev*: ref TDoublyLinkedNode[T]
|
next*, prev*: ref TDoublyLinkedNode[T]
|
||||||
value*: T
|
value*: T
|
||||||
PDoublyLinkedNode*[T] = ref TDoublyLinkedNode[T]
|
PDoublyLinkedNode*[T] = ref TDoublyLinkedNode[T]
|
||||||
|
|
||||||
TSinglyLinkedNode[T] {.pure, final.} = object
|
TSinglyLinkedNode*[T] {.pure,
|
||||||
|
final.} = object ## a node a singly linked list consists of
|
||||||
next*: ref TSinglyLinkedNode[T]
|
next*: ref TSinglyLinkedNode[T]
|
||||||
value*: T
|
value*: T
|
||||||
PSinglyLinkedNode*[T] = ref TSinglyLinkedNode[T]
|
PSinglyLinkedNode*[T] = ref TSinglyLinkedNode[T]
|
||||||
|
|
||||||
|
TRingNode[T] {.pure,
|
||||||
|
final.} = object ## a node a ring list consists of
|
||||||
|
next*, prev*: ref TRingNode[T]
|
||||||
|
value*: T
|
||||||
|
|
||||||
|
PRingNode*[T] = ref TRingNode[T]
|
||||||
|
|
||||||
proc newDoublyLinkedNode*[T](value: T): PDoublyLinkedNode[T] =
|
proc newDoublyLinkedNode*[T](value: T): PDoublyLinkedNode[T] =
|
||||||
## creates a new doubly linked node with the given `value`.
|
## creates a new doubly linked node with the given `value`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue