data-section #3

Merged
sashakoshka merged 42 commits from data-section into main 2022-08-17 18:21:20 +00:00
1 changed files with 7 additions and 1 deletions
Showing only changes of commit 210e527b3a - Show all commits

View File

@ -90,7 +90,8 @@ func (parser *ParsingOperation) parseType () (what Type, err error) {
err = parser.expect (
lexer.TokenKindUInt,
lexer.TokenKindRBrace)
lexer.TokenKindRBrace,
lexer.TokenKindElipsis)
if err != nil { return }
if parser.token.Is(lexer.TokenKindUInt) {
@ -98,6 +99,11 @@ func (parser *ParsingOperation) parseType () (what Type, err error) {
what.length = parser.token.Value().(uint64)
err = parser.nextToken(lexer.TokenKindRBrace)
if err != nil { return }
} else if parser.token.Is(lexer.TokenKindElipsis) {
what.kind = TypeKindArray
err = parser.nextToken(lexer.TokenKindRBrace)
if err != nil { return }
}