docs(union): describe first-class union nodes
This commit is contained in:
@@ -139,10 +139,9 @@ walker mirrors, with file:line anchors (as of `705e501`). Read WITH
|
||||
## Extractor configs (languages/c-cpp.ts — read the whole file when porting)
|
||||
|
||||
**cExtractor (line 180):** functionTypes=[function_definition]; NO
|
||||
class/method/interface types; structTypes=[struct_specifier]
|
||||
(superseded: `union_specifier` joined structTypes — a named `union U { … };`
|
||||
is a definition, extracted with kind `struct`, and `typedef union { … } N;`
|
||||
resolves through resolveTypeAliasKind like `typedef struct`);
|
||||
class/method/interface types; structTypes=[struct_specifier];
|
||||
unionTypes=[union_specifier] (a named `union U { … };` is a definition, and
|
||||
`typedef union { … } N;` resolves to a first-class `union` node);
|
||||
enumTypes=[enum_specifier]; enumMemberTypes=[enumerator];
|
||||
typeAliasTypes=[type_definition]; importTypes=[preproc_include];
|
||||
callTypes=[call_expression]; variableTypes=[declaration];
|
||||
|
||||
@@ -54,9 +54,9 @@ Types: functionTypes=[`function_item`, **`function_signature_item`**] (the
|
||||
latter = a trait method DECLARATION `fn render(&self);` — extracted so a
|
||||
trait's method set is first-class); classTypes=[] (impl blocks instead);
|
||||
methodTypes = same two; interfaceTypes=[`trait_item`] with
|
||||
**interfaceKind:'trait'**; structTypes=[`struct_item`] (superseded:
|
||||
`union_item` joined structTypes — same `body` field, same extractor, kind
|
||||
`struct`); enumTypes=[`enum_item`];
|
||||
**interfaceKind:'trait'**; structTypes=[`struct_item`];
|
||||
unionTypes=[`union_item`] (same body walk, distinct `union` node kind);
|
||||
enumTypes=[`enum_item`];
|
||||
enumMemberTypes=[`enum_variant`]; typeAliasTypes=[`type_item`];
|
||||
importTypes=[`use_declaration`]; callTypes=[`call_expression`];
|
||||
variableTypes=[`let_declaration`, `const_item`, `static_item`].
|
||||
|
||||
Reference in New Issue
Block a user