+ ret = ctf_visitor_semantic_check(stderr, 0, &scanner->ast->root);
+ if (ret) {
+ fprintf(stderr, "Error in CTF semantic validation %d\n", ret);
+ goto end;
+ }
+ trace = malloc(sizeof(*trace));
+ memset(trace, 0, sizeof(*trace));
+ ret = ctf_visitor_construct_metadata(stderr, 0, &scanner->ast->root,
+ trace, BYTE_ORDER);
+ if (ret) {
+ fprintf(stderr, "Error in CTF metadata constructor %d\n", ret);
+ goto free_trace;
+ }
+free_trace:
+ free(trace);
+end:
+ ctf_scanner_free(scanner);