Function root blocks are now skimmed over

This commit is contained in:
Sasha Koshka 2022-09-05 15:06:22 -04:00
parent ae0166b509
commit d6db27ccb6
1 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,13 @@ func (parser *ParsingOperation) parseFuncSection () (
err = parser.parseFuncArguments(&section)
if err != nil { return }
// skip the rest of the section if we are only skimming it
if parser.skimming {
section.external = true
err = parser.skipIndentLevel(1)
return
}
// check to see if the function is external
if !parser.token.Is(lexer.TokenKindIndent) { return }
if parser.token.Value().(int) != 1 { return }