| 318 | } |
| 319 | |
| 320 | inline bool |
| 321 | Node::hasAtom(const std::string& id) { |
| 322 | if (Array* a = dynamic_cast<Array*>(this)) { |
| 323 | for (int i=a->a.size(); i--;) |
| 324 | if (Atom* at = dynamic_cast<Atom*>(a->a[i])) |
| 325 | if (at->id == id) |
| 326 | return true; |
| 327 | } else if (Atom* a = dynamic_cast<Atom*>(this)) { |
| 328 | return a->id == id; |
| 329 | } |
| 330 | return false; |
| 331 | } |
| 332 | |
| 333 | inline bool |
| 334 | Node::isCall(const std::string& id) { |