mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 05:10:55 +00:00
fixulate Parser.kt
This commit is contained in:
parent
9fe959799d
commit
7b931327ff
@ -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})"
|
||||||
|
Loading…
Reference in New Issue
Block a user