mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Split Parse out to its own target. (#3556)
This is mirroring the structure of codegen/codegen.h, lower/lower.h, and check/check.h. I recently did lex/lex.h, so parse/parse.h is the last. Now, the directory's main API file is eponymous with the directory. I could've used a friend function to avoid making the Tree constructor public, but in other places we make less use of `friend`, just leaving things public. This felt more consistent, and simple because it only affects the constructor.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#include "toolchain/diagnostics/sorting_diagnostic_consumer.h"
|
||||
#include "toolchain/lex/lex.h"
|
||||
#include "toolchain/lower/lower.h"
|
||||
#include "toolchain/parse/tree.h"
|
||||
#include "toolchain/parse/parse.h"
|
||||
#include "toolchain/sem_ir/formatter.h"
|
||||
#include "toolchain/source/source_buffer.h"
|
||||
|
||||
@@ -438,8 +438,8 @@ class Driver::CompilationUnit {
|
||||
auto RunParse() -> bool {
|
||||
CARBON_CHECK(tokens_);
|
||||
|
||||
LogCall("Parse::Tree::Parse", [&] {
|
||||
parse_tree_ = Parse::Tree::Parse(*tokens_, *consumer_, vlog_stream_);
|
||||
LogCall("Parse::Parse", [&] {
|
||||
parse_tree_ = Parse::Parse(*tokens_, *consumer_, vlog_stream_);
|
||||
});
|
||||
if (options_.dump_parse_tree) {
|
||||
consumer_->Flush();
|
||||
|
||||
Reference in New Issue
Block a user