Object initialization value parsing is now done recursively
This commit is contained in:
parent
31bb36a4f7
commit
aee90757e3
@ -14,12 +14,12 @@ func (parser *ParsingOperation) parseBody () (err error) {
|
|||||||
case "data":
|
case "data":
|
||||||
var section *DataSection
|
var section *DataSection
|
||||||
section, err = parser.parseDataSection()
|
section, err = parser.parseDataSection()
|
||||||
if err != nil { return }
|
|
||||||
if parser.tree.dataSections == nil {
|
if parser.tree.dataSections == nil {
|
||||||
parser.tree.dataSections =
|
parser.tree.dataSections =
|
||||||
make(map[string] *DataSection)
|
make(map[string] *DataSection)
|
||||||
}
|
}
|
||||||
parser.tree.dataSections[section.name] = section
|
parser.tree.dataSections[section.name] = section
|
||||||
|
if err != nil { return }
|
||||||
case "type":
|
case "type":
|
||||||
case "face":
|
case "face":
|
||||||
case "enum":
|
case "enum":
|
||||||
|
|||||||
@ -68,6 +68,7 @@ func (parser *ParsingOperation) parseInitializationValues (
|
|||||||
|
|
||||||
if parser.token.Is(lexer.TokenKindDot) {
|
if parser.token.Is(lexer.TokenKindDot) {
|
||||||
|
|
||||||
|
// object initialization
|
||||||
parser.previousToken()
|
parser.previousToken()
|
||||||
var initializationValues ObjectInitializationValues
|
var initializationValues ObjectInitializationValues
|
||||||
initializationValues, err = parser.parseObjectInitializationValues()
|
initializationValues, err = parser.parseObjectInitializationValues()
|
||||||