Ok so maybe that one commit wasn't entirely true

This commit is contained in:
Sasha Koshka 2024-02-15 01:12:51 -05:00
parent e2367b26c2
commit 0684410631
2 changed files with 4 additions and 6 deletions

View File

@ -210,8 +210,10 @@ testStringSkim (test,
+ ComplexType: (. parser:Parser tree:*Tree skim:Bool)
+ X: Int
+ X.[pub]:Int
- X.[priv]:Int
+ X.[alreadyExternal]
+ [alreadyExternal]
- [priv]
+ [pub]:X`,
// input
`- PrivType:Int

View File

@ -37,9 +37,7 @@ func (this *treeParser) parseTopLevel () error {
if this.Is(lexer.LBracket) {
function, err := this.parseFunctionCore(pos, access)
if err != nil { return err }
if !this.skim || function.Acc != entity.AccessPrivate {
this.tree.AddDeclaration(function)
}
this.tree.AddDeclaration(function)
return nil
}
@ -55,9 +53,7 @@ func (this *treeParser) parseTopLevel () error {
if err != nil { return err }
method, err := this.parseMethodCore(pos, access, typeName)
if err != nil { return err }
if !this.skim || method.Acc != entity.AccessPrivate {
this.tree.AddDeclaration(method)
}
this.tree.AddDeclaration(method)
case lexer.Colon:
// Colon: Typedef
err = this.ExpectNextDesc(descriptionType, startTokensType...)