wow it hangs
This commit is contained in:
parent
2111960f6d
commit
5b627f8995
@ -35,16 +35,28 @@ func (parser *ParsingOperation) parseDataSection () (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if data is external
|
err = parser.expect(lexer.TokenKindNewline)
|
||||||
if parser.token.Is(lexer.TokenKindName) &&
|
if err != nil { return }
|
||||||
parser.token.Value().(string) == "external" {
|
err = parser.nextToken()
|
||||||
|
if err != nil { return }
|
||||||
|
|
||||||
section.external = true
|
// check if data is external
|
||||||
err = parser.nextToken(lexer.TokenKindNewline)
|
if parser.token.Is(lexer.TokenKindIndent) &&
|
||||||
|
parser.token.Value().(int) == 1 {
|
||||||
|
|
||||||
|
err = parser.nextToken(lexer.TokenKindName)
|
||||||
if err != nil { return }
|
if err != nil { return }
|
||||||
err = parser.nextToken()
|
if parser.token.Value().(string) == "external" {
|
||||||
if err != nil { return }
|
|
||||||
return
|
section.external = true
|
||||||
|
err = parser.nextToken(lexer.TokenKindNewline)
|
||||||
|
if err != nil { return }
|
||||||
|
err = parser.nextToken()
|
||||||
|
if err != nil { return }
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
parser.previousToken()
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ func (what Type) ToString (indent int) (output string) {
|
|||||||
output += what.defaultValue.ToString(indent, true)
|
output += what.defaultValue.ToString(indent, true)
|
||||||
} else {
|
} else {
|
||||||
output += ":<"
|
output += ":<"
|
||||||
output += what.defaultValue.ToString(indent, true)
|
output += what.defaultValue.ToString(indent, false)
|
||||||
output += ">\n"
|
output += ">\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -269,7 +269,7 @@ func (argument Argument) ToString (indent int, breakLine bool) (output string) {
|
|||||||
func (section DataSection) ToString (indent int) (output string) {
|
func (section DataSection) ToString (indent int) (output string) {
|
||||||
output += doIndent (
|
output += doIndent (
|
||||||
indent,
|
indent,
|
||||||
"type ",
|
"data ",
|
||||||
section.permission.ToString(), " ",
|
section.permission.ToString(), " ",
|
||||||
section.name, ":",
|
section.name, ":",
|
||||||
section.what.ToString(indent), "\n")
|
section.what.ToString(indent), "\n")
|
||||||
|
Reference in New Issue
Block a user