summaryrefslogtreecommitdiff
path: root/spec/inputs/annotation_before.yue
blob: 9b11aad84bb6b1af507af8cc7461d2ea19138ce4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
macro Tag = (tag, code`ClassDecl) ->
	className = code\match "^class%s+(%w+)"
	return
		type: "text"
		before: tag == "before"
		code: "-- #{tag}:#{className}"

$[Tag("before")]
class B
	getTag: => "before"

$[Tag("after")]
class C
	getTag: => "after"

return B!\getTag!, C!\getTag!