Rizin
unix-like reverse engineering framework and cli tools
meson_tree_sitter_generate Namespace Reference

Functions

def parse ()
 
def main ()
 

Function Documentation

◆ main()

def meson_tree_sitter_generate.main ( void  )

Definition at line 28 of file meson_tree_sitter_generate.py.

28 def main():
29  tree_sitter_exe, output_dir, grammar_js = parse()
30 
31  grammar_js = os.path.abspath(grammar_js)
32  output_dir = os.path.abspath(output_dir)
33  tree_sitter_exe = os.path.abspath(tree_sitter_exe)
34 
35  subprocess.run(
36  [tree_sitter_exe, "generate", grammar_js], check=True, cwd=output_dir
37  )
38 
39 
Definition: regcomp.c:57

◆ parse()

def meson_tree_sitter_generate.parse ( )

Definition at line 14 of file meson_tree_sitter_generate.py.

14 def parse():
15  if len(sys.argv) <= 3:
16  print(
17  "Usage: {} <tree-sitter-path> <output-dir> <grammar.js>".format(sys.argv[0])
18  )
19  sys.exit(1)
20 
21  tree_sitter_exe = sys.argv[1]
22  output_dir = sys.argv[2]
23  grammar_js = sys.argv[3]
24 
25  return tree_sitter_exe, output_dir, grammar_js
26 
27 
size_t len
Definition: 6502dis.c:15

References len.