mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 15:06:40 +00:00
Add location information to diagnostics. (#385)
Add simple mocking and testing of diagnostic emission to ensure this works.
This commit is contained in:
1 parent
b2455d8dba
commit
d1757d9979
26 files changed
+621
-172
No files matched your search
@@ -19,8 +19,11 @@
|
||||
|
||||
namespace Carbon {
|
||||
|
||||
auto ParseTree::Parse(TokenizedBuffer& tokens, DiagnosticEmitter& emitter)
|
||||
auto ParseTree::Parse(TokenizedBuffer& tokens, DiagnosticConsumer& consumer)
|
||||
-> ParseTree {
|
||||
TokenizedBuffer::TokenLocationTranslator translator(tokens);
|
||||
TokenDiagnosticEmitter emitter(translator, consumer);
|
||||
|
||||
// Delegate to the parser.
|
||||
return Parser::Parse(tokens, emitter);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user