Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
49265fa1
Commit
49265fa1
authored
Jul 30, 2009
by
jbeder
Browse files
Fixed empty scalar in sequence bug
parent
c043b9c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
src/node.cpp
src/node.cpp
+1
-1
src/sequence.cpp
src/sequence.cpp
+9
-0
src/token.h
src/token.h
+4
-2
No files found.
src/node.cpp
View file @
49265fa1
...
...
@@ -264,7 +264,7 @@ namespace YAML
if
(
node
.
m_pContent
)
node
.
m_pContent
->
Write
(
out
);
else
out
<<
""
;
out
<<
Null
;
return
out
;
}
...
...
src/sequence.cpp
View file @
49265fa1
...
...
@@ -4,6 +4,7 @@
#include "scanner.h"
#include "token.h"
#include "emitter.h"
#include <stdexcept>
namespace
YAML
{
...
...
@@ -80,6 +81,14 @@ namespace YAML
Node
*
pNode
=
new
Node
;
m_data
.
push_back
(
pNode
);
// check for null
if
(
!
pScanner
->
empty
())
{
const
Token
&
token
=
pScanner
->
peek
();
if
(
token
.
type
==
TT_BLOCK_ENTRY
||
token
.
type
==
TT_BLOCK_END
)
continue
;
}
pNode
->
Parse
(
pScanner
,
state
);
}
}
...
...
src/token.h
View file @
49265fa1
...
...
@@ -30,7 +30,8 @@ namespace YAML
TT_ANCHOR
,
TT_ALIAS
,
TT_TAG
,
TT_SCALAR
TT_SCALAR
,
TT_NULL
};
const
std
::
string
TokenNames
[]
=
{
...
...
@@ -51,7 +52,8 @@ namespace YAML
"ANCHOR"
,
"ALIAS"
,
"TAG"
,
"SCALAR"
"SCALAR"
,
"NULL"
};
struct
Token
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment