Skip to content

Commit 2b5e263

Browse files
committed
ICU4J: Allow any type of expression in an unsupported statement, per grammar
1 parent a3a4024 commit 2b5e263

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,7 @@ private MFDataModel.Declaration getDeclaration() throws MFParseException {
770770
input.backup(2);
771771
}
772772
expression = getPlaceholder();
773-
// This also covers != null
774-
if (expression instanceof MFDataModel.VariableExpression) {
773+
if (expression != null) {
775774
expressions.add(expression);
776775
} else {
777776
break;

testdata/message2/reserved-syntax-2.json

Lines changed: 2 additions & 1 deletion
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)