scopes.c
// Search for a tag in a scope and recurse to parents if not found.
// Returns zero if not found in any parents
Search for a tag in a scope and recurse to parents if not found.
Returns zero if not found in any parents
Search for a tag in a scope and recurse to parents if not found . Returns zero if not found in any parents
Tag *lookup_tag(char *name, Scope *scope, int recurse) {
    Tag *tag = strmap_get(scope->tags, name);
    if (tag) return tag;
    else if (recurse && scope->parent) return lookup_tag(name, scope->parent, recurse);
    else return 0;
}
Tag * lookup_tag ( char * name , Scope * scope , int recurse ) { Tag * tag = strmap_get ( scope -> tags , name ) ; if ( tag ) return tag ; else if ( recurse && scope -> parent ) return lookup_tag ( name , scope -> parent , recurse ) ; else return 0 ; }
Search for a tag in a scope and recurse to parents if not found.
Search for a tag in a scope and recurse to parents if not found .