[PATCH] D102590: [YAMLParser] Add multi-line literal folding support

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 30 14:21:01 PDT 2021


scott.linder added a comment.

In D102590#2971046 <https://reviews.llvm.org/D102590#2971046>, @HassanElDesouky wrote:

> @scott.linder Thank you so much for the review!
>
> 1. I made the changes you pointed out regarding defining a new `scanBlockScalarIndicators` method.
> 2. I think the idea of `enum BlockStyle` and `enum BlockChomping` is really good. I will definitely implement it but maybe in another PR/diff. -- if that's okay :)

Yes, that sounds great :)

> 3. I'm afraid that your suggested code in regarding simplifying the logic behind folding is not correct. It doesn't work with folded scalars that has strip/clip. However, I tried my best to simplify the logic. If you have any other ideas let me know!

I couldn't figure out exactly what was going wrong with my changes, and when I actually build my changes locally it seems to implement the strip/clip/keep as I'd expect. The existing tests don't cover all the combinations, and the contents changing between them makes it harder to compare, so I also updated the test. See the attached patch (which includes your changes, with my proposed edits), which you should be able to apply with `git am` F18749263: 0001-Proposed-revisions-to-https-reviews.llvm.org-D102590.patch <https://reviews.llvm.org/F18749263>.
Can you let me know what I'm missing?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102590/new/

https://reviews.llvm.org/D102590



More information about the llvm-commits mailing list