mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-28 22:02:37 +01:00
Replace int lines with file-associated SourceLocations (#779)
Most interesting changes should be ast/source_location.h and syntax/parse_and_lex_context.h
This commit is contained in:
@@ -130,9 +130,9 @@ void Statement::PrintDepth(int depth, llvm::raw_ostream& out) const {
|
||||
}
|
||||
}
|
||||
|
||||
Return::Return(int line_num, const Expression* exp, bool is_omitted_exp)
|
||||
: Statement(Kind::Return, line_num),
|
||||
exp(exp != nullptr ? exp : global_arena->RawNew<TupleLiteral>(line_num)),
|
||||
Return::Return(SourceLocation loc, const Expression* exp, bool is_omitted_exp)
|
||||
: Statement(Kind::Return, loc),
|
||||
exp(exp != nullptr ? exp : global_arena->RawNew<TupleLiteral>(loc)),
|
||||
is_omitted_exp(is_omitted_exp) {
|
||||
CHECK(exp != nullptr || is_omitted_exp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user