Can’t find any examples of this being used in the head as the options list. throws is working fine but I am stuck… actually I don’t think I have ever used forall as a generator at all ever anyway.
Just need one good example, my test, which I want to refactor, looks like this:
% parses a good definition
%
% when I come back!
% forall generator, have a tk s1 and s2 variations
%
% [tk(10,`ERIC`), s1(10,`ERIC`), s2(10,`ERIC`)]
test(good_definition_token) :-
phrase(
ast:s_defvar(Out),
[op(0), defvar(1), tk(2,`name`), tk(10,`ERIC`), cp(20)]),
assertion(Out == defvar(`name`,tk(10,`ERIC`)))
,
phrase(
ast:s_defvar(Out),
[op(0), defvar(1), tk(2,`name`), s1(10,`ERIC`), cp(20)]),
assertion(Out == defvar(`name`,s1(10,`ERIC`)))
,
phrase(
ast:s_defvar(Out),
[op(0), defvar(1), tk(2,`name`), s2(10,`ERIC`), cp(20)]),
assertion(Out == defvar(`name`,s2(10,`ERIC`))).