Objects can only inherit by specifiying an identifier

This commit is contained in:
Sasha Koshka 2022-08-24 18:52:31 -04:00
parent 821fa0ecb3
commit 715766edb4
2 changed files with 2 additions and 3 deletions

View File

@ -33,7 +33,7 @@ func (parser *ParsingOperation) parseObjtSection () (
if err != nil { return }
err = parser.nextToken()
if err != nil { return }
section.inherits, err = parser.parseType()
section.inherits, err = parser.parseIdentifier()
if err != nil { return }
err = parser.expect(lexer.TokenKindNewline)
if err != nil { return }

View File

@ -191,10 +191,9 @@ type ObjtSection struct {
name string
// TODO: make this Identifier instead of Type
inherits Type
inherits Identifier
permission types.Permission
// TODO: order matters here we need to store these in an array
// TODO: add bitfield support (:n)
members map[string] ObjtMember
}