mirror of
https://github.com/thunderbrewhq/binana.git
synced 2026-05-03 13:03:54 +00:00
feat(bna): implement fix-labels command
The fix-labels command will fix a symbol file by automatically renaming labels matching a certain regex, and looking for the captured parameter in a "fixlist" i.e. a newline delimited list of OG names.
This commit is contained in:
parent
d020e6ba36
commit
cbb42eb953
6 changed files with 145 additions and 4 deletions
|
|
@ -39,7 +39,7 @@ type QueryParams struct {
|
|||
MaxBuild uint32
|
||||
// Regular expression for tokens (symbols/type information)
|
||||
Token string
|
||||
// If true, Token is a POSIX regular expression
|
||||
// If true, Token is a RE2 regular expression
|
||||
RegEx bool
|
||||
}
|
||||
|
||||
|
|
@ -202,9 +202,9 @@ func Query(params *QueryParams) {
|
|||
var token_query token_query
|
||||
token_query.params = params
|
||||
if params.RegEx {
|
||||
token_query.token_regexp = regexp.MustCompilePOSIX(token_query.params.Token)
|
||||
token_query.token_regexp = regexp.MustCompile(token_query.params.Token)
|
||||
} else {
|
||||
token_query.token_regexp = regexp.MustCompilePOSIX(regexp.QuoteMeta(params.Token))
|
||||
token_query.token_regexp = regexp.MustCompile(regexp.QuoteMeta(params.Token))
|
||||
}
|
||||
|
||||
if err := token_query.load_sample_database(); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue