Small parser and ToString fixes
This commit is contained in:
parent
c290b3a3d7
commit
ae50fab159
@ -39,13 +39,16 @@ func (member ObjectMember) ToString (indent int) (output string) {
|
||||
indent, "member ",
|
||||
member.permission.ToString(), " ",
|
||||
member.name)
|
||||
|
||||
if member.bitWidth > 0 {
|
||||
output += fmt.Sprint(" width ", member.bitWidth)
|
||||
}
|
||||
|
||||
output += "\n"
|
||||
|
||||
output += member.what.ToString(indent + 1)
|
||||
if member.argument != nil {
|
||||
output += member.argument.ToString(indent + 1)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,8 @@ func (parser *parsingOperation) parseTypeSectionMember () (
|
||||
|
||||
// see if value exists
|
||||
if parser.token.Is(lexer.TokenKindNewline) {
|
||||
parser.nextToken()
|
||||
err = parser.nextToken()
|
||||
if err != nil { return }
|
||||
// if we have exited the member, return
|
||||
if !parser.token.Is(lexer.TokenKindIndent) { return }
|
||||
if parser.token.Value().(int) != 2 { return }
|
||||
|
@ -7,7 +7,10 @@ type ro aBasicInt:Int 5
|
||||
type ro bOnBasicInt:aBasicInt
|
||||
|
||||
type ro cBasicObject:Obj
|
||||
ro that:Int
|
||||
ro that:UInt
|
||||
ro this:Int
|
||||
|
||||
type ro dInheritedFromOther:something.Thing
|
||||
|
||||
type ro eInheritObject:cBasicObject
|
||||
rw that
|
||||
|
Reference in New Issue
Block a user