MCPcopy Create free account
hub / github.com/Gecode/gecode / flattenAnnotations

Function flattenAnnotations

gecode/flatzinc/flatzinc.cpp:1032–1044  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1030 }
1031
1032 void flattenAnnotations(AST::Array* ann, std::vector<AST::Node*>& out) {
1033 for (unsigned int i=0; i<ann->a.size(); i++) {
1034 if (ann->a[i]->isCall("seq_search")) {
1035 AST::Call* c = ann->a[i]->getCall();
1036 if (c->args->isArray())
1037 flattenAnnotations(c->args->getArray(), out);
1038 else
1039 out.push_back(c->args);
1040 } else {
1041 out.push_back(ann->a[i]);
1042 }
1043 }
1044 }
1045
1046 void
1047 FlatZincSpace::createBranchers(Printer&p, AST::Node* ann, FlatZincOptions& opt,

Callers 1

createBranchersMethod · 0.85

Calls 5

isCallMethod · 0.80
getCallMethod · 0.80
isArrayMethod · 0.80
getArrayMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected