-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Token locations python bindings #120
Conversation
7f1a4f4
to
ccdde60
Compare
In order to preserve backwards compatibility the `line_number` property has been kept, but will be deprecated. Now any other `Location` instance will include `line_number`, that should not be mentioned in the documentation.
ccdde60
to
5e6dc9c
Compare
402ce39
to
a8cdf96
Compare
First of all thank you for the PR and for recognizing the problems with location of some tokens. The code is alright and I approve it. As for the first checkbox: Please do open a separate pull request for it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I will soon fix the location computing and uncomment the tests. Thank you!
Add a way to access locations of various objects in yara files from python.
Interface
location
is now represented as a structure instead ofstd::pair
Rule::Location
interface,line_number
andfile_path
TokenType
for eachToken
String
interface to providelocation
attribute just like the rulesRule
-token_first
,token_last
String
-token_first
,token_last
,token_id
,token_assign
TODO
TokenType
to cpp11 styleenum class
enums, I reverted them because I think they are out of the scope of this PR, if you want I can open a separate PR for just this. What do you think about this change?FIXME:
comments. Keep in mind that the values in the tests are my expectations, I you think they are not right we can discuss the changes.