From 7cf356971bc8a5a81d1a353f52c24f67bb33af20 Mon Sep 17 00:00:00 2001 From: Violet White Date: Thu, 14 Sep 2023 21:31:53 -0700 Subject: [PATCH] Pass teh test --- .../main/kotlin/gay/pizza/pork/parser/TokenTypeProperty.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parser/src/main/kotlin/gay/pizza/pork/parser/TokenTypeProperty.kt b/parser/src/main/kotlin/gay/pizza/pork/parser/TokenTypeProperty.kt index 3bd3228..fe0fa62 100644 --- a/parser/src/main/kotlin/gay/pizza/pork/parser/TokenTypeProperty.kt +++ b/parser/src/main/kotlin/gay/pizza/pork/parser/TokenTypeProperty.kt @@ -17,9 +17,10 @@ interface TokenTypeProperty { break } } + if (upgraded == null) { - for(item in TokenType.AnyOf) { - if(item.anyOf != null && item.anyOf.strings.contains(token.text)) { + for (item in TokenType.AnyOf) { + if (item.anyOf != null && item.anyOf.strings.contains(token.text)) { upgraded = Token(item, token.start, token.text) break }