mirror of https://github.com/status-im/NimYAML.git
Fixed a bug with setting ! in %TAG directive
This commit is contained in:
parent
e1cee73b27
commit
2e8d7b39ab
|
@ -63,8 +63,6 @@ template parserError(message: string) {.dirty.} =
|
||||||
e.line = p.lexer.lineNumber
|
e.line = p.lexer.lineNumber
|
||||||
e.column = p.tokenstart + 1
|
e.column = p.tokenstart + 1
|
||||||
e.lineContent = p.getLineContent(true)
|
e.lineContent = p.getLineContent(true)
|
||||||
echo "line ", e.line, ", column ", e.column, ": ", message
|
|
||||||
echo e.lineContent
|
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
template lexerError(lx: BaseLexer, message: string) {.dirty.} =
|
template lexerError(lx: BaseLexer, message: string) {.dirty.} =
|
||||||
|
@ -1050,7 +1048,7 @@ proc parse*(p: YamlParser, s: Stream): YamlStream =
|
||||||
startToken()
|
startToken()
|
||||||
p.lexer.tagShorthand(shorthand)
|
p.lexer.tagShorthand(shorthand)
|
||||||
p.lexer.tagUri(uri)
|
p.lexer.tagUri(uri)
|
||||||
shorthands.add(shorthand, uri)
|
shorthands[shorthand] = uri
|
||||||
p.lexer.lineEnding()
|
p.lexer.lineEnding()
|
||||||
handleLineEnd(false)
|
handleLineEnd(false)
|
||||||
of ldUnknown:
|
of ldUnknown:
|
||||||
|
|
Loading…
Reference in New Issue