6

I know that during parsing, yaml-cpp can throw an exception that has nice file location (line and column number) information for where the exception occurred. How about post-parse? Is there any mechanism to determine the (first) line number of a YAML file that is associated with a given node?

zorch
  • 61
  • 1

2 Answers2

5

Starting with 0.5.3 YAML::Node has a property Mark() to get information about line number etc.

Simon Schmeißer
  • 324
  • 4
  • 12
-1

No, there isn't, but this is an open feature request - see the issue on the project page.

Jesse Beder
  • 33,081
  • 21
  • 109
  • 146