diff --git a/fz/semantic.pl b/fz/semantic.pl index a8c3c9f..a27e4f1 100644 --- a/fz/semantic.pl +++ b/fz/semantic.pl @@ -47,11 +47,10 @@ sa_n(var(N,T,[],A), V, ST) :- !, V=var(N,T,[],AX), % new AST node becomes ST entry value st_insert(ST, N, V). -sa_n(var(N,T,I,A), NI, ST) :- % non-empty initializer - sa_attribs(A, AX, ST), % should ignore this? - sa_n_traverse(I, NI, ST), % parse initializer - V=var(N,T,NI,AX), % new AST node becomes ST entry value - st_insert(ST, N, V). +sa_n(var(N,_T,I,_A), NI, ST) :- % non-empty initializer + sa_n_traverse(I, NI, ST), % parse initializer (& ignore T and A), + V=NI, % -- just NI, not var(N,T,NI,AX) -- + st_insert(ST, N, V). % which becomes the ST entry value sa_n(lit(E,array(T)), lit(NE, array(T)), ST) :- @@ -66,8 +65,9 @@ sa_n(id(N), V, ST) :- V=var(N,_,_,_), % type as yet unknown st_insert(ST, N, V). -sa_n(constraint(CE, AT), constraint(NCE, AT), ST) :- +sa_n(constraint(CE, A), constraint(NCE, AX), ST) :- CE=..[C|AS], + sa_attribs(A, AX, ST), sa_n_traverse(AS, NAS, ST), NCE=..[C|NAS]. -- libgit2 0.21.2