Add an introspect module for structs.
Also missing struct fields to the Python bindings that were discovered as a result of the new `introspect` metadata. PiperOrigin-RevId: 523947396 Change-Id: I367fd2dc8d5fd7e5712a45b70a5c50da51d152e4
This commit is contained in:
committed by
Copybara-Service
parent
bcb19fd85c
commit
2e23594fe8
@@ -27,8 +27,7 @@ from absl import flags
|
||||
from introspect import ast_nodes
|
||||
from . import formatter
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
flags.DEFINE_string(
|
||||
_JSON_PATH = flags.DEFINE_string(
|
||||
'json_path', None,
|
||||
'Path to the JSON file representing the Clang AST for mujoco.h')
|
||||
|
||||
@@ -85,7 +84,7 @@ def main(argv: Sequence[str]) -> None:
|
||||
if len(argv) > 1:
|
||||
raise app.UsageError('Too many command-line arguments.')
|
||||
|
||||
with open(FLAGS.json_path, 'r', encoding='utf-8') as f:
|
||||
with open(_JSON_PATH.value, 'r', encoding='utf-8') as f:
|
||||
root = json.load(f)
|
||||
|
||||
visitor = MjEnumVisitor()
|
||||
|
||||
Reference in New Issue
Block a user