2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-19 04:22:13 +00:00

- More tests

- Block sequences and block maps working
This commit is contained in:
Joel de Guzman
2011-11-15 17:22:02 +08:00
parent dd5df0fbe2
commit 20e3437fa8
4 changed files with 14 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
- Boston Red Sox
- Detroit Tigers
- New York
Yankees
Yankees # this should be folded to "New York Yankees" !
national:
- New York Mets
- Chicago Cubs

View File

@@ -1,4 +1,5 @@
- Boston Red Sox
- Detroit Tigers
- New York Yankees
- A
- B
- C
- [x, y, z]
- D

View File

@@ -0,0 +1,7 @@
- A
- B
- C
- [x, y, z]
- D
- E : yabba dabba

View File

@@ -88,7 +88,7 @@ namespace omd { namespace parser
blocks %=
save_indent
>> (block_main | restore_indent)
>> (block_main | !restore_indent)
>> restore_indent
;
@@ -111,7 +111,7 @@ namespace omd { namespace parser
omit[*blank_line] // Ignore blank lines
>> omit[repeat(_r1)[blank]] // Indent _r1 spaces
>> omit['-' >> blank] // Get the sequence indicator '-'
>> flow_value // Get the value
>> yaml_nested // Get the entry
;
auto block_map_indicator = // Lookahead and see if we have a