mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
YAMLIO: Allow scalars to dictate quotation rules
Introduce ScalarTraits::mustQuote which determines whether or not a StringRef needs quoting before it is acceptable to output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205955 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -426,8 +426,10 @@ looks like:
|
||||
static StringRef input(StringRef scalar, T &value) {
|
||||
// do custom parsing here. Return the empty string on success,
|
||||
// or an error message on failure.
|
||||
return StringRef();
|
||||
return StringRef();
|
||||
}
|
||||
// Determine if this scalar needs quotes.
|
||||
static bool mustQuote(StringRef) { return true; }
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user