git @ Cat's Eye Technologies Tamsin / e1d106a
Going to need to extend the AST to cover all parts of a Term... Cat's Eye Technologies 11 years ago
1 changed file(s) with 32 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
119119 return set(V, DT).
120120 analyze(CP, term(T)) =
121121 return term(T).
122
123 #####
124 # returns a tree of locals
125
126 locals(call(PR, As)) =
127 return nil.
128 locals(or(L, R)) =
129 locals(L) → LL &
130 locals(R) → LR &
131 return tree(LL, LR).
132 locals(and(L, R)) =
133 locals(L) → LL &
134 locals(R) → LR &
135 return tree(LL, LR).
136 locals(not(X)) =
137 locals(X).
138 locals(while(X)) =
139 locals(X).
140 locals(concat(L, R)) =
141 locals(L) → LL &
142 locals(R) → LR &
143 return tree(LL, LR).
144 locals(using(R, P)) =
145 locals(R).
146 locals(send(R, V)) =
147 locals(R). # XXX also V!
148 locals(set(V, T)) =
149 locals(T). # XXX also V!
150 locals(term(T)) =
151 return nil.
152
153 # XXX need to extend the AST to cover all parts of a term. ok...
122154 }