From 24d2ff5743209e8eb299ee287b40c2bb3d609268 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Mon, 11 Sep 2023 05:03:12 -0400 Subject: [PATCH] parser: fix parsing of modifiers for let definitions --- examples/count.pork | 2 +- parser/src/main/kotlin/gay/pizza/pork/parser/Parser.kt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/count.pork b/examples/count.pork index 7736387..e9d72a2 100644 --- a/examples/count.pork +++ b/examples/count.pork @@ -1,4 +1,4 @@ -let count = 5 +export let count = 5 export func main() { var x = 1 diff --git a/parser/src/main/kotlin/gay/pizza/pork/parser/Parser.kt b/parser/src/main/kotlin/gay/pizza/pork/parser/Parser.kt index 72b090f..c88adde 100644 --- a/parser/src/main/kotlin/gay/pizza/pork/parser/Parser.kt +++ b/parser/src/main/kotlin/gay/pizza/pork/parser/Parser.kt @@ -266,7 +266,6 @@ class Parser(source: PeekableSource, val attribution: NodeAttribution) { } private fun readLetDefinition(modifiers: DefinitionModifiers): LetDefinition = within { - val modifiers = readDefinitionModifiers() expect(TokenType.Let) val name = readSymbolRaw() expect(TokenType.Equals)