majintao0131 / yaml-cpp

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

Problem changing the position of an item #219

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, I'm having the following problem:

I had an structure like this:

Background: backgroud.png
Elements:
 -type: Rectangle
  colour:red
  x:5
  y:6 
 -type: Circle
  colour:green
  x:7
  y:9

if I change this in the following way:

Background: backgroud.png
Elements:
-type: Rectangle
  colour:red
  x:5
  y:6 
 -type: Circle
  colour:green
  x:7
  y:9

The parser fails...

IS THERE A WAY TO DETECT THIS KIND OF ERRORS AND SKIP THEM?

to what I mean is when one item change his position that doesn't affect the 
following data. I need to Parse this and skip it.

Original issue reported on code.google.com by die_zehn...@hotmail.com on 13 Sep 2013 at 5:19

GoogleCodeExporter commented 9 years ago
The first example you give doesn't do what you want. You need a space between 
the - and the word "type".

The second example you give is just plain incorrect YAML. The parser is 
supposed to fail. Why would you want the parser to skip this?

Original comment by jbe...@gmail.com on 13 Sep 2013 at 1:06