Added bit fields to tree and ToString for object member
This commit is contained in:
parent
b64fbd9fc4
commit
fb43f96acc
@ -298,6 +298,10 @@ func (member ObjtMember) ToString (indent int) (output string) {
|
|||||||
output += member.name + ":"
|
output += member.name + ":"
|
||||||
output += member.what.ToString()
|
output += member.what.ToString()
|
||||||
|
|
||||||
|
if member.bitWidth > 0 {
|
||||||
|
output += fmt.Sprint(":", member.bitWidth)
|
||||||
|
}
|
||||||
|
|
||||||
isComplexInitialization :=
|
isComplexInitialization :=
|
||||||
member.defaultValue.kind == ArgumentKindObjectInitializationValues ||
|
member.defaultValue.kind == ArgumentKindObjectInitializationValues ||
|
||||||
member.defaultValue.kind == ArgumentKindArrayInitializationValues
|
member.defaultValue.kind == ArgumentKindArrayInitializationValues
|
||||||
|
@ -180,6 +180,7 @@ type ObjtMember struct {
|
|||||||
name string
|
name string
|
||||||
|
|
||||||
what Type
|
what Type
|
||||||
|
bitWidth int
|
||||||
permission types.Permission
|
permission types.Permission
|
||||||
defaultValue Argument
|
defaultValue Argument
|
||||||
}
|
}
|
||||||
@ -189,6 +190,7 @@ type ObjtSection struct {
|
|||||||
location file.Location
|
location file.Location
|
||||||
name string
|
name string
|
||||||
|
|
||||||
|
// TODO: make this Identifier instead of Type
|
||||||
inherits Type
|
inherits Type
|
||||||
permission types.Permission
|
permission types.Permission
|
||||||
// TODO: order matters here we need to store these in an array
|
// TODO: order matters here we need to store these in an array
|
||||||
@ -225,6 +227,7 @@ type FaceBehavior struct {
|
|||||||
type FaceSection struct {
|
type FaceSection struct {
|
||||||
location file.Location
|
location file.Location
|
||||||
name string
|
name string
|
||||||
|
// TODO: make this Identifier instead of string
|
||||||
inherits string
|
inherits string
|
||||||
|
|
||||||
permission types.Permission
|
permission types.Permission
|
||||||
|
Reference in New Issue
Block a user