Skip to content

Commit

Permalink
feat: Added possiblity to clone expressions (both AST node + tokenstr…
Browse files Browse the repository at this point in the history
…eam) (#268)

* feat: Added possiblity to clone expressions (both AST node + tokenstream)

This will make it easier to create copies out of existing expressions
without having to rebuild them yourself manually (especially if their
structure is not fixed).

* feat: Added cloning of regexes

* fix: Fixed Python bindings build

* tests: Added Python bindings clone tests (very limited for now)

* fix: regex parsing with \/

* fix: Fixed print in Dump Rules AST example for RegexpText visitor

* fix: Fixed (finally) parser for regexes and their escape sequences

* fix: Fixed Python type hints
  • Loading branch information
metthal authored Jan 10, 2025
1 parent 593dfcd commit 22c8561
Show file tree
Hide file tree
Showing 17 changed files with 3,881 additions and 43 deletions.
1 change: 1 addition & 0 deletions include/yaramod/types/expression.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class Expression
}
virtual TokenIt getFirstTokenIt() const = 0;
virtual TokenIt getLastTokenIt() const = 0;
virtual Expression::Ptr clone(const std::shared_ptr<TokenStream>& /*target*/) const = 0;
/// @}


Expand Down
Loading

0 comments on commit 22c8561

Please sign in to comment.