Add a synonym for ParseExpression to use when parsing a type, to make

parsing code a little more readable.
This commit is contained in:
Richard Smith
2021-04-20 23:43:25 -07:00
parent 34f1a03f7b
commit 4a92c41673
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -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());