fixulate Parser.kt

This commit is contained in:
Violet White 2023-09-14 21:03:01 -07:00 committed by GitHub
parent 9fe959799d
commit 7b931327ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,7 @@ class Parser(source: TokenSource, attribution: NodeAttribution) :
override fun parseDeclaration(): Declaration = guarded {
val token = peek()
return@guarded when (token.type) {
TokenType.Import -> parseImportDeclaration()
TokenType.Import, TokenType.Impork, TokenType.PorkLoad -> parseImportDeclaration()
else -> throw ParseError(
"Failed to parse token: ${token.type} '${token.text}' as" +
" declaration (index ${source.currentIndex})"