mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-20 06:46:43 +00:00
Initial implementation of returned var. (#1348)
This PR implements the `returned var` for the explorer. - Enabled `returned var` and `return var` syntax in lexer and parser. - Split `Return` statement into `ReturnVar` and `ReturnExpression` to distinguish the two types of returns. - Added logic in name resolution, type checking and interpretation to process `returned var` definition and `ReturnVar` statement.
This commit is contained in:
1 parent
a23f15e901
commit
9106e9239e
29 files changed
+544
-61
No files matched your search
@@ -131,7 +131,6 @@ auto ActionStack::FinishAction() -> ErrorOr<Success> {
|
||||
case Action::Kind::ExpressionAction:
|
||||
case Action::Kind::LValAction:
|
||||
case Action::Kind::PatternAction:
|
||||
CARBON_FATAL() << "This kind of action must produce a result: " << *act;
|
||||
case Action::Kind::ScopeAction:
|
||||
CARBON_FATAL() << "ScopeAction at top of stack";
|
||||
case Action::Kind::StatementAction:
|
||||
|
||||
Reference in new issue
Block a user