Files @ 28df9835906f
Branch filter:

Location: CSY/reowolf/testdata/parser/positive/15.pdl

MH
Reimplement namespaced identifier to support polymorphic args

This is somewhat of a temporary hack, as a namespaced identifier should
not really refer to types or polymorphic arguments. But we need a
tokenizer and a prepass to properly distinguish identifiers from types.
So it works, but error messages may be cryptic.
#version

import std.reo;

composite main(out c) {
	channel ao -> ai;
	channel bo -> bi;
	channel axo -> axi;
	channel zo -> zi;
	new sync(ai, bo);
	new replicator(bi, {axo, c});
	new consensus({axi, zi}, ao);
	new generator(zo);
}

primitive generator(out z) {
	while (true) {
		synchronous (msg x) {
			if (x == null) {
				put(z, x);
				assert !fires(x);
			} else {
				put(z, x);
				assert fires(x);
			}
		}
	}
}