Fixed type section parsing at EOF

This commit is contained in:
Sasha Koshka 2022-10-12 14:21:19 -04:00
parent b2fadd2fd3
commit 3662b2e298
3 changed files with 5 additions and 1 deletions

View File

@ -34,7 +34,8 @@ func (parser *parsingOperation) parseTypeSection () (
// see if value exists
if parser.token.Is(lexer.TokenKindNewline) {
parser.nextToken()
err = parser.nextToken()
if err != nil { return }
// if we have exited the section, return
if !parser.token.Is(lexer.TokenKindIndent) { return }
if parser.token.Value().(int) != 1 { return }

View File

@ -35,5 +35,6 @@ type ro iIntArrayInit:Int:3
923
92
)
type ro jAtEnd:Int
`, test)
}

View File

@ -34,3 +34,5 @@ type ro hIntArray:{Int ..}
type ro iIntArrayInit:Int:3
(3298 923 92)
type ro jAtEnd:Int