[all-commits] [llvm/llvm-project] 652cea: [YAMLParser] Unfold multi-line scalar values (#70898)

Igor Kudrin via All-commits all-commits at lists.llvm.org
Thu Nov 9 16:19:38 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 652ceaddc0ea899f4d3edef66715ae164e3d8c4d
      https://github.com/llvm/llvm-project/commit/652ceaddc0ea899f4d3edef66715ae164e3d8c4d
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2023-11-10 (Fri, 10 Nov 2023)

  Changed paths:
    M llvm/include/llvm/Support/YAMLParser.h
    M llvm/lib/Support/YAMLParser.cpp
    M llvm/test/YAMLParser/spec-05-13.test
    M llvm/test/YAMLParser/spec-05-14.test
    M llvm/test/YAMLParser/spec-09-01.test
    M llvm/test/YAMLParser/spec-09-02.test
    M llvm/test/YAMLParser/spec-09-03.test
    M llvm/test/YAMLParser/spec-09-04.test
    M llvm/test/YAMLParser/spec-09-05.test
    M llvm/test/YAMLParser/spec-09-07.test
    M llvm/test/YAMLParser/spec-09-08.test
    M llvm/test/YAMLParser/spec-09-09.test
    M llvm/test/YAMLParser/spec-09-10.test
    M llvm/test/YAMLParser/spec-09-11.test
    M llvm/test/YAMLParser/spec-09-13.test
    M llvm/test/YAMLParser/spec-09-16.test
    M llvm/test/YAMLParser/spec-09-17.test
    M llvm/test/YAMLParser/spec-10-02.test
    M llvm/test/YAMLParser/spec1.2-07-05.test
    M llvm/test/YAMLParser/spec1.2-07-06.test
    M llvm/test/YAMLParser/spec1.2-07-09.test
    M llvm/test/YAMLParser/spec1.2-07-12.test
    M llvm/unittests/Support/YAMLParserTest.cpp

  Log Message:
  -----------
  [YAMLParser] Unfold multi-line scalar values (#70898)

Long scalar values can be split into multiple lines to improve
readability. The rules are described in Section 6.5. "Line Folding",
https://yaml.org/spec/1.2.2/#65-line-folding. In addition, for flow
scalar styles, the Spec states that "All leading and trailing white
space characters on each line are excluded from the content",
https://yaml.org/spec/1.2.2/#73-flow-scalar-styles.

The patch implements these unfolding rules for double-quoted,
single-quoted, and plain scalars.




More information about the All-commits mailing list