mirror of https://github.com/AMT-Cheif/drift.git
Make parser assert it's at end after finishing
This commit is contained in:
parent
c5d46adcb5
commit
1654193af4
|
@ -113,6 +113,9 @@ class Parser {
|
|||
final stmt = select() ?? _deleteStmt() ?? _update();
|
||||
|
||||
_matchOne(TokenType.semicolon);
|
||||
if (!_isAtEnd) {
|
||||
_error('Expected the statement to finish here');
|
||||
}
|
||||
return stmt;
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ const Map<String, TokenType> keywords = {
|
|||
'DELETE': TokenType.delete,
|
||||
'FROM': TokenType.from,
|
||||
'NATURAL': TokenType.natural,
|
||||
'LEFT': TokenType.leftParen,
|
||||
'LEFT': TokenType.left,
|
||||
'OUTER': TokenType.outer,
|
||||
'INNER': TokenType.inner,
|
||||
'CROSS': TokenType.cross,
|
||||
|
|
Loading…
Reference in New Issue