[PATCH] YAML: Implement block scalar parsing
Alex Lorenz
arphaman at gmail.com
Wed May 13 09:47:15 PDT 2015
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 '>'.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D9503
Files:
include/llvm/Support/YAMLParser.h
lib/Support/YAMLParser.cpp
test/YAMLParser/spec-09-14.test
test/YAMLParser/spec-09-18.test
test/YAMLParser/spec-09-19.test
test/YAMLParser/spec-09-20.test
test/YAMLParser/spec-09-21.test
test/YAMLParser/spec-09-22.test
test/YAMLParser/spec-09-24.test
test/YAMLParser/spec-09-25.test
test/YAMLParser/spec-09-26.test
test/YAMLParser/spec-09-27.test
test/YAMLParser/spec-09-28.test
unittests/Support/YAMLParserTest.cpp
utils/yaml-bench/YAMLBench.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9503.25701.patch
Type: text/x-patch
Size: 21590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150513/ce608ce2/attachment.bin>
More information about the llvm-commits
mailing list