From 2208079355ba54b658f452528735416cd57bcbce Mon Sep 17 00:00:00 2001 From: torque Date: Thu, 23 Nov 2023 17:55:47 -0800 Subject: [PATCH] parser.Options: embellish expect_enum_dot description This affects tagged union parsing, and that should be mentioned here. So now it is. --- src/parser.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parser.zig b/src/parser.zig index c697fef..8a337f5 100644 --- a/src/parser.zig +++ b/src/parser.zig @@ -99,7 +99,9 @@ pub const Options = struct { // look like source code enum literals. Any enum value missing the leading `.` will // result in a conversion error. If set to false, no preprocessing will be done // and enum values will be converted from the literal scalar/string. These two styles - // cannot be mixed in a single document. + // cannot be mixed in a single document. Note that this setting also affects how + // tagged unions are parsed (specifically, the union's field name must also have the + // leading `.` if this option is enabled.) expect_enum_dot: bool = true, // Only used by the parseTo family of functions.