mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 15:18:11 +00: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:
1 parent
33daf64329
commit
3ec550a85f
46 files changed
+607
-518
No files matched your search
@@ -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