mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:31:15 +01:00
Parsing support for return statements.
This commit is contained in:
@@ -199,8 +199,16 @@ class ParseTree::Parser {
|
||||
// Parses a while-statement.
|
||||
auto ParseWhileStatement() -> llvm::Optional<Node>;
|
||||
|
||||
enum class KeywordStatementArgument {
|
||||
None,
|
||||
Optional,
|
||||
Mandatory,
|
||||
};
|
||||
|
||||
// Parses a statement of the form `keyword;` such as `break;` or `continue;`.
|
||||
auto ParseKeywordStatement(ParseNodeKind kind) -> llvm::Optional<Node>;
|
||||
auto ParseKeywordStatement(ParseNodeKind kind,
|
||||
KeywordStatementArgument argument)
|
||||
-> llvm::Optional<Node>;
|
||||
|
||||
// Parses a statement.
|
||||
auto ParseStatement() -> llvm::Optional<Node>;
|
||||
|
||||
Reference in New Issue
Block a user