Added untested bit width parsing
This commit is contained in:
parent
05aa0e6177
commit
731cc828ce
@ -96,6 +96,15 @@ func (parser *ParsingOperation) parseObjtMember () (
|
||||
if err != nil { return }
|
||||
member.what, err = parser.parseType()
|
||||
if err != nil { return }
|
||||
|
||||
// if there is a bit width, get it
|
||||
if parser.token.Is(lexer.TokenKindColon) {
|
||||
err = parser.nextToken(lexer.TokenKindUInt)
|
||||
if err != nil { return }
|
||||
member.bitWidth = parser.token.Value().(uint64)
|
||||
err = parser.nextToken()
|
||||
if err != nil { return }
|
||||
}
|
||||
|
||||
// parse default value
|
||||
if parser.token.Is(lexer.TokenKindNewline) {
|
||||
|
@ -180,7 +180,7 @@ type ObjtMember struct {
|
||||
name string
|
||||
|
||||
what Type
|
||||
bitWidth int
|
||||
bitWidth uint64
|
||||
permission types.Permission
|
||||
defaultValue Argument
|
||||
}
|
||||
|
Reference in New Issue
Block a user