summaryrefslogtreecommitdiff
path: root/tnslc/dummy.tnsl
blob: 8fdb1652c5ca58afe678c47721237744b97a3f74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
; struct Token {
	int
		token_type,
		line,
		col,

	~{}charp
		data
}

;struct Node {
	Token
		# associated token to the node
		tok,

	~{}Node
		# sub-nodes
		sub
}

;{}charp cnull = "a"

/; main [int]
	;{}Node s = {}
	;Node n = {{1, 2, 3, ~cnull}, ~s}
	;s.append(n)
	;tnsl.io.println(~s)
	;tnsl.io.println(n.sub)
	;return 0
;/