mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
parse, lex: Decompose AST extraction and forward-declare dump types (#7645)
- Enhance toolchain/parse/node_kind.def with category x-macros (CARBON_PARSE_NODE_KIND_DECLARATION, CARBON_PARSE_NODE_KIND_EXPRESSION, CARBON_PARSE_NODE_KIND_PATTERN, CARBON_PARSE_NODE_KIND_STATEMENT) that default to CARBON_PARSE_NODE_KIND, keeping node_kind.def as the single source of truth without manual expansion divergence. - Decompose the monolithic toolchain/parse/extract.cpp translation unit into separate compilation units for declarations, expressions, patterns, and statements by expanding respective category x-macros. - Forward-declare Tree and TokenizedBuffer in parse and lex dump headers to reduce header inclusion depth. Assisted-by: Antigravity with Gemini
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "common/raw_string_ostream.h"
|
||||
#include "toolchain/lex/dump.h"
|
||||
#include "toolchain/parse/context.h"
|
||||
#include "toolchain/parse/tree.h"
|
||||
|
||||
namespace Carbon::Parse {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user