Fixed nested complex initialization values not parsing

This commit is contained in:
Sasha Koshka 2022-08-19 11:36:30 -04:00
parent 9dce9b2f75
commit 2605d1fb09
2 changed files with 2 additions and 3 deletions

View File

@ -111,8 +111,7 @@ data ro object:Obj
func TestType (test *testing.T) { func TestType (test *testing.T) {
checkTree ("../tests/parser/type", checkTree ("../tests/parser/type",
` `:arf
:arf
--- ---
type ro Basic:Int type ro Basic:Int
type ro BasicInit:Int 6 type ro BasicInit:Int 6

View File

@ -147,7 +147,7 @@ func (parser *ParsingOperation) parseTypeNodeChildren (
err = parser.nextToken() err = parser.nextToken()
if err != nil { return } if err != nil { return }
var child TypeNode var child TypeNode
child, err = parser.parseTypeNode(baseIndent + 1) child, err = parser.parseTypeNode(baseIndent)
// if the member has already been listed, throw an error // if the member has already been listed, throw an error
_, exists := parent.children[child.name] _, exists := parent.children[child.name]