Summary Files Commits Branches @commit @diff @stats
path: root / src / Token / IToken.cl
blob: 05282ab0c03520530d5076200c549dcb047abf29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class IToken inherits System {
---
	name() : String {
		not_implemented_retstr("name")
	};

	value() : String {
		not_implemented_retstr("value")
	};

---
	id: Int;

	id() : Int {
		id
	};

	init(iid: Int) : Object {{
		assert(iid = 0, "init", "ID 0 is not allowed for a token!");
		assert(not (id = 0), "init", "token object '".concat(name()).concat("' is already initialized!"));
		id <- iid;
		void;
	}};
};