Skip to content

Commit c3ea7a7

Browse files
committed
ICU4J: Allow any type of expression in an unsupported statement, per grammar
1 parent 22ce1cd commit c3ea7a7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: icu4j/main/core/src/main/java/com/ibm/icu/message2/MFParser.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,7 @@ private MFDataModel.Declaration getDeclaration() throws MFParseException {
763763
input.backup(2);
764764
}
765765
expression = getPlaceholder();
766-
// This also covers != null
767-
if (expression instanceof MFDataModel.VariableExpression) {
766+
if (expression != null) {
768767
expressions.add(expression);
769768
} else {
770769
break;

Diff for: testdata/message2/reserved-syntax-2.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
{ "src" : "\\\\{ ? 󗟋 𫓜|@} | \\} @𠟅򑚎𥪙𽧫=|| @򒘒򳷦㥞򉊷=$򸚶񽱆񅗽񤕞 @𰺱:񎫛񢶛򶈎񄮒}", "ignoreCpp": "This would be an error in ICU4C" },
1010
{ "src" : "{ $iFN ^ @USh =$u @l}", "ignoreCpp": "This would be an error in ICU4C" },
1111
{ "src" : ".local $dS ={ $p4 ^ |.| \\\\ @g:FV = $kd}{{@}}", "ignoreCpp": "This would be an error in ICU4C" },
12-
{ "src" : ".D. \\\\ ||{1}{{}} ", "ignoreCpp": "This would be an error in ICU4C" }
12+
{ "src" : ".D. \\\\ ||{1}{{}} ", "ignoreCpp": "This would be an error in ICU4C" },
13+
{ "src" : ".cIT ||{|@| % \\} } { *󔜫񥘃󸇀 }{{}}", "ignoreCpp": "This would be an error in ICU4C" }
1314
]
1415
}
1516

0 commit comments

Comments
 (0)