[parser] fix conversion
[parser] fix error in disabled debug mode
[parser] add doctest
[merge] resolve conflicts