Example #1
0
    void GlobalsCollector::visit(ast::SimpleVar & e)
    {
	if (!e.getParent()->isFieldExp() || static_cast<ast::FieldExp *>(e.getParent())->getTail() != &e)
	{
	    const symbol::Symbol & sym = e.getSymbol();
	    if (locals.find(sym) == locals.end())
	    {
		globals.emplace(sym);
	    }
	}
    }