This patch implements the parsing of YAML block scalars. Some code existed there before, but it couldn't parse block scalars.
This patch is based on the patch 'http://reviews.llvm.org/D9448' that enables the YAMLParser tests.
I've added a new yaml node type to represent the block scalar values.
I've deleted the files 'spec-09-27.test' and 'spec-09-28.test' as they are identical to the file 'spec-09-26.test'.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
As suggested by Duncan, I took out the extraction of the skipComment method from this patch,
which I've committed separately in r236663. I also took out the change to the KeyValueNode skip method,
which I've committed separately in r236669.
Comment Actions
I've applied Duncan's suggestions to this patch:
- Got rid of line folding, it will go into a separate patch.
- Refactored and extracted functions that scan block scalar header, chomping indicator, indent indicator, search for block's indentation and scan the block indentation.
- Added helper functions advanceWhile, consumeLineBreakIfPresent and applyChompingIndicator.
- Decided to keep the name Start instead of renaming it to BlockStart.
- Used a SmallString instead of an output stream.
- Asserted that the first character is either an '|' or '>'.
Comment Actions
This update uses a new helper function that consumes a line break in another part of code that I forgot to update last time.