src/grammar.cpp
void Grammar::walkExpansion(Expansion * e, void (* callback)(Expansion *)) {
    callback(e);
    if(e->hasChild()) {
        for(unsigned int i = 0; i < e->childCount(); i++) {
            Grammar::walkExpansion(e->getChild(i).get(), callback);
        }
    }
}
/// Walks through the given expansion and all of its children. Calls the callback function for each expansion it walks across.
Walks through the given expansion and all of its children. Calls the callback function for each expansion it walks across.
Walks through the given expansion and all of its children . Calls the callback function for each expansion it walks across .
void Grammar::walkExpansion(Expansion * e, void (* callback)(Expansion *)) {
    callback(e);
    if(e->hasChild()) {
        for(unsigned int i = 0; i < e->childCount(); i++) {
            Grammar::walkExpansion(e->getChild(i).get(), callback);
        }
    }
}
void Grammar :: walkExpansion ( Expansion * e , void ( * callback ) ( Expansion * ) ) { callback ( e ) ; if ( e -> hasChild ( ) ) { for ( unsigned int i = 0 ; i < e -> childCount ( ) ; i ++ ) { Grammar :: walkExpansion ( e -> getChild ( i ) . get ( ) , callback ) ; } } }
Walks through the given expansion and all of its children.
Walks through the given expansion and all of its children .