This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import strutils | |
| type | |
| TThing = ref object | |
| data: int | |
| children: seq[TThing] | |
| proc `$`(t: TThing): string = | |
| result = "($1, $2)" % @[$t.data, join(map(t.children, proc(th: TThing): string = $th), ", ")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type | |
| TNode_S = ptr object | |
| id: int | |
| child_l: TNode_S | |
| child_r: TNode_S | |
| var | |
| counter = 0 | |
| wurzel: TNode_S = nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type | |
| Node_S = object | |
| child_l: ptr Node_S |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import re | |
| import sequtils | |
| import strutils | |
| import tables | |
| import typetraits | |
| type | |
| EDocoptLanguageError = object of E_Base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type | |
| TThing = ref object | |
| method something(t: TThing): string: | |
| result = "thingy" |