type-section #4

Merged
sashakoshka merged 15 commits from type-section into main 2022-08-20 02:06:45 +00:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 2605d1fb09 - Show all commits

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]