mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 18:30:30 +00:00
Parsing and basic checking for abstract class and base class. (#3385)
For now, we require the same introducer to be used each time a class is declared, but see #3384. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
1 parent
49591d1360
commit
2715e2276e
23 files changed
+520
-114
No files matched your search
@@ -186,7 +186,7 @@ auto HandleStatementReturn(Context& context) -> void {
|
||||
|
||||
if (auto var_token = context.ConsumeIf(Lex::TokenKind::Var)) {
|
||||
// `return var;`
|
||||
context.AddLeafNode(NodeKind::ReturnVarSpecifier, *var_token);
|
||||
context.AddLeafNode(NodeKind::ReturnVarModifier, *var_token);
|
||||
} else if (!context.PositionIs(Lex::TokenKind::Semi)) {
|
||||
// `return <expression>;`
|
||||
context.PushState(State::Expr);
|
||||
|
||||
Reference in new issue
Block a user