mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 19:04:59 +01:00
Add a synonym for ParseExpression to use when parsing a type, to make
parsing code a little more readable.
This commit is contained in:
@@ -440,7 +440,7 @@ auto ParseTree::Parser::ParseVariableDeclaration() -> Node {
|
||||
TokenizedBuffer::Token var_token = Consume(TokenKind::VarKeyword());
|
||||
auto start = StartSubtree();
|
||||
|
||||
auto type = ParseExpression();
|
||||
auto type = ParseType();
|
||||
|
||||
auto name = ConsumeAndAddLeafNodeIf(TokenKind::Identifier(),
|
||||
ParseNodeKind::DeclaredName());
|
||||
|
||||
Reference in New Issue
Block a user