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:
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
- Boston Red Sox
|
||||
- Detroit Tigers
|
||||
- New York Yankees
|
||||
- A
|
||||
- B
|
||||
- C
|
||||
- [x, y, z]
|
||||
- D
|
||||
7
test/test_files/yaml_block_array2.yaml
Normal file
7
test/test_files/yaml_block_array2.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
- A
|
||||
- B
|
||||
- C
|
||||
- [x, y, z]
|
||||
- D
|
||||
- E : yabba dabba
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user