Skip to content

Commit 0dca3b6

Browse files
committed
fix(isc): field_value rejects { to allow braced generic fields
The field_value raw-capture rule was matching opening braces, preventing the braced(raw_text) alternative from being tried. Now field_value excludes { so generic fields like 'original_description { CJK text }' parse correctly. Verification: 276/289 (96%), 11 ISC fail, 0 differ.
1 parent 74af9ca commit 0dca3b6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/interscript/isc/grammar/concerns/metadata.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,14 @@ module Metadata
113113
# field additions; semantic validation happens in DocumentBuilder.
114114
rule(:generic_field) do
115115
identifier.as(:field_name) >> inline_whitespace? >>
116-
(empty_field | field_value.as(:field_value))
116+
(empty_field |
117+
field_value.as(:field_value) |
118+
braced(raw_text.as(:field_block)))
117119
end
118120

119121
rule(:field_value) do
120122
quoted_string |
121-
(newline.absent? >> (str("}").absent? >> any)).repeat(1).as(:raw)
123+
(newline.absent? >> (str("}").absent? >> str("{").absent? >> any)).repeat(1).as(:raw)
122124
end
123125

124126
rule(:empty_field) do

0 commit comments

Comments
 (0)