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

View File

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