Adds support for the @inspectFile operator

This commit is contained in:
Felipe Zimmerle
2017-10-31 09:42:06 -03:00
parent 1189e9b0ef
commit 1866a3a9eb
7 changed files with 897 additions and 724 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -905,8 +905,12 @@ op_before_init:
}
| OPERATOR_INSPECT_FILE FREE_TEXT
{
/* $$ = new operators::InspectFile($1); */
OPERATOR_NOT_SUPPORTED("InspectFile", @0);
OPERATOR_CONTAINER($$, new operators::InspectFile($2));
std::string error;
if ($$->init(driver.ref.back(), &error) == false) {
driver.error(@0, error);
YYERROR;
}
}
| OPERATOR_FUZZY_HASH FREE_TEXT
{