@@ -23,6 +23,7 @@ The **Direct** pipeline (`parse_to_tree` → `transform` → `to_lark` → `reco
2323| ` hcl2/formatter.py ` | Whitespace alignment and spacing on LarkElement trees |
2424| ` hcl2/reconstructor.py ` | LarkElement tree → HCL2 text via Lark |
2525| ` hcl2/builder.py ` | Programmatic HCL document construction |
26+ | ` hcl2/walk.py ` | Generic tree-walking primitives for the LarkElement IR tree |
2627| ` hcl2/utils.py ` | ` SerializationOptions ` , ` SerializationContext ` , string helpers |
2728| ` hcl2/const.py ` | Constants: ` IS_BLOCK ` , ` COMMENTS_KEY ` , ` INLINE_COMMENTS_KEY ` |
2829| ` cli/helpers.py ` | File/directory/stdin conversion helpers |
@@ -31,8 +32,15 @@ The **Direct** pipeline (`parse_to_tree` → `transform` → `to_lark` → `reco
3132| ` cli/hq.py ` | ` hq ` CLI entry point — query dispatch, formatting, optional operator |
3233| ` hcl2/query/__init__.py ` | Public query API exports |
3334| ` hcl2/query/_base.py ` | ` NodeView ` base class, view registry, ` view_for() ` factory |
35+ | ` hcl2/query/body.py ` | ` DocumentView ` , ` BodyView ` facades for top-level and body queries |
36+ | ` hcl2/query/blocks.py ` | ` BlockView ` facade for block queries |
37+ | ` hcl2/query/attributes.py ` | ` AttributeView ` facade for attribute queries |
38+ | ` hcl2/query/containers.py ` | ` TupleView ` , ` ObjectView ` facades for container queries |
39+ | ` hcl2/query/expressions.py ` | ` ConditionalView ` facade for conditional expressions |
40+ | ` hcl2/query/functions.py ` | ` FunctionCallView ` facade for function call queries |
41+ | ` hcl2/query/for_exprs.py ` | ` ForTupleView ` , ` ForObjectView ` facades for for-expressions |
3442| ` hcl2/query/path.py ` | Structural path parser (` PathSegment ` , ` parse_path ` , ` [select()] ` , ` type:name ` ) |
35- | ` hcl2/query/resolver.py ` | Path resolver — segment-by-segment with label depth, type filter, FunctionCallView |
43+ | ` hcl2/query/resolver.py ` | Path resolver — segment-by-segment with label depth, type filter |
3644| ` hcl2/query/pipeline.py ` | Pipe operator — ` split_pipeline ` , ` classify_stage ` , ` execute_pipeline ` |
3745| ` hcl2/query/builtins.py ` | Built-in transforms: ` keys ` , ` values ` , ` length ` |
3846| ` hcl2/query/diff.py ` | Structural diff between two HCL documents |
@@ -65,12 +73,13 @@ Follows the `json` module convention. All option parameters are keyword-only.
6573
6674- ` load/loads ` — HCL2 text → Python dict
6775- ` dump/dumps ` — Python dict → HCL2 text
76+ - ` query ` — HCL2 text/file → ` DocumentView ` for structured queries
6877- Intermediate stages: ` parse/parses ` , ` parse_to_tree/parses_to_tree ` , ` transform ` , ` serialize ` , ` from_dict ` , ` from_json ` , ` reconstruct `
6978
7079### Option Dataclasses
7180
7281** ` SerializationOptions ` ** (LarkElement → dict):
73- ` with_comments ` , ` with_meta ` , ` wrap_objects ` , ` wrap_tuples ` , ` explicit_blocks ` , ` preserve_heredocs ` , ` force_operation_parentheses ` , ` preserve_scientific_notation `
82+ ` with_comments ` , ` with_meta ` , ` wrap_objects ` , ` wrap_tuples ` , ` explicit_blocks ` , ` preserve_heredocs ` , ` force_operation_parentheses ` , ` preserve_scientific_notation ` , ` strip_string_quotes `
7483
7584** ` DeserializerOptions ` ** (dict → LarkElement):
7685` heredocs_to_strings ` , ` strings_to_heredocs ` , ` object_elements_colon ` , ` object_elements_trailing_comma `
0 commit comments