aboutsummaryrefslogtreecommitdiff
path: root/compiler/test_util_test.go
blob: 2ead2c998b154279df2433022b2ea3b7af289dba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package compiler

func newRangeSymbolNodeWithPos(from, to byte, pos symbolPosition) *symbolNode {
	n := newRangeSymbolNode(from, to)
	n.pos = pos
	return n
}

func newSymbolNodeWithPos(v byte, pos symbolPosition) *symbolNode {
	n := newSymbolNode(v)
	n.pos = pos
	return n
}

func newEndMarkerNodeWithPos(id int, pos symbolPosition) *endMarkerNode {
	n := newEndMarkerNode(id)
	n.pos = pos
	return n
}