certik / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Associate marks with nodes again #200

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The new API removed a very important feature:  the ability to associate a line 
and column number with a particular element.  This is a big problem because it 
means that I have lost the ability to tell the user at what line and column an 
error occurred if they made a mistake in the input.  It would be nice if Nodes 
once again had an (optional) associated mark so that this information could be 
available.

Original issue reported on code.google.com by gcrosswh...@gmail.com on 15 Apr 2013 at 11:57

GoogleCodeExporter commented 9 years ago
Good idea.

Original comment by jbe...@gmail.com on 3 May 2013 at 1:06

GoogleCodeExporter commented 9 years ago
The attached patch adds marks (position information) to nodes. It also uses 
this information when throwing the TypedBadConversion expressions, since these 
are likely to occur when walking the tree immediately after parsing.

Additionally, the what() formatting for YAML::Exception has been cleaned up 
somewhat. If the position information is missing, it is not printed.

There is at least one quirk, which is that a node alias gets the position of 
the node it refers to.

Original comment by antonbac...@yahoo.com on 29 Jun 2013 at 6:34

Attachments:

GoogleCodeExporter commented 9 years ago
Please add support for this. For us this is the only reason not to upgrade to 
the new API.

Original comment by kccon...@gmail.com on 1 Mar 2014 at 9:11

GoogleCodeExporter commented 9 years ago
I updated the patch to work with the newest tree.

Tested with clang 3.4, gcc 4.7, MSVC 2013.

Original comment by kccon...@gmail.com on 24 Mar 2014 at 1:37

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 225 has been merged into this issue.

Original comment by jbe...@gmail.com on 16 Jun 2014 at 1:03

GoogleCodeExporter commented 9 years ago
Issue 255 has been merged into this issue.

Original comment by jbe...@gmail.com on 22 Aug 2014 at 3:54

GoogleCodeExporter commented 9 years ago
could the patch be evaluated and possibly merged?

Original comment by dmori...@gmail.com on 25 Sep 2014 at 5:59

GoogleCodeExporter commented 9 years ago
Issue 259 has been merged into this issue.

Original comment by jbe...@gmail.com on 25 Sep 2014 at 11:24