mirror of
https://github.com/thunderbrewhq/binana.git
synced 2026-04-27 11:13:50 +00:00
feat(build): implement Clangd support && add lua symbols
This commit is contained in:
parent
6163593844
commit
e79ee08905
78 changed files with 399 additions and 5445 deletions
|
|
@ -18,12 +18,14 @@ var query_cmd = cobra.Command{
|
|||
|
||||
func init() {
|
||||
f := query_cmd.Flags()
|
||||
f.Bool("regex", false, "use regex to for matching token names")
|
||||
f.Uint32("min-build", 0, "the minimum build to return tokens for")
|
||||
f.Uint32("max-build", math.MaxUint32, "the maximum build to return tokens for")
|
||||
f.StringSlice("program", nil, "a list of programs to return tokens for")
|
||||
f.StringSlice("os", nil, "a list of kernel names to return tokens for (windows, darwin, linux)")
|
||||
f.StringSlice("arch", nil, "a list of CPU architectures to return tokens for (ppc, 386, amd64)")
|
||||
f.String("present", "normal", "control the way tokens are presented to console (normal, name-only)")
|
||||
f.Bool("quote", false, "quote strings before presenting")
|
||||
root.RootCmd.AddCommand(&query_cmd)
|
||||
}
|
||||
|
||||
|
|
@ -34,6 +36,10 @@ func run_query_cmd(cmd *cobra.Command, args []string) {
|
|||
err error
|
||||
presentation_mode string
|
||||
)
|
||||
params.RegEx, err = f.GetBool("regex")
|
||||
if err != nil {
|
||||
app.Fatal(err)
|
||||
}
|
||||
params.MinBuild, err = f.GetUint32("min-build")
|
||||
if err != nil {
|
||||
app.Fatal(err)
|
||||
|
|
@ -58,11 +64,17 @@ func run_query_cmd(cmd *cobra.Command, args []string) {
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
params.Quote, err = f.GetBool("quote")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
switch presentation_mode {
|
||||
case "normal":
|
||||
params.Present = util.PresentQueryNormal
|
||||
case "name-only":
|
||||
params.Present = util.PresentQueryNameOnly
|
||||
case "sample-name":
|
||||
params.Present = util.PresentQuerySampleName
|
||||
default:
|
||||
cmd.Help()
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue