Skip to content

Commit

Permalink
ICU4J: Allow any type of expression in an unsupported statement, per …
Browse files Browse the repository at this point in the history
…grammar
  • Loading branch information
catamorphism committed Aug 7, 2024
1 parent 22ce1cd commit c3ea7a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,7 @@ private MFDataModel.Declaration getDeclaration() throws MFParseException {
input.backup(2);
}
expression = getPlaceholder();
// This also covers != null
if (expression instanceof MFDataModel.VariableExpression) {
if (expression != null) {
expressions.add(expression);
} else {
break;
Expand Down
3 changes: 2 additions & 1 deletion testdata/message2/reserved-syntax-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
{ "src" : "\\\\{ ? 󗟋 𫓜|@} | \\} @𠟅򑚎𥪙𽧫=|| @򒘒򳷦㥞򉊷=$򸚶񽱆񅗽񤕞 @𰺱:񎫛񢶛򶈎񄮒}", "ignoreCpp": "This would be an error in ICU4C" },
{ "src" : "{ $iFN ^ @USh =$u @l}", "ignoreCpp": "This would be an error in ICU4C" },
{ "src" : ".local $dS ={ $p4 ^ |.| \\\\ @g:FV = $kd}{{@}}", "ignoreCpp": "This would be an error in ICU4C" },
{ "src" : ".D. \\\\ ||{1}{{}} ", "ignoreCpp": "This would be an error in ICU4C" }
{ "src" : ".D. \\\\ ||{1}{{}} ", "ignoreCpp": "This would be an error in ICU4C" },
{ "src" : ".cIT ||{|@| % \\} } { *󔜫񥘃󸇀 }{{}}", "ignoreCpp": "This would be an error in ICU4C" }
]
}

0 comments on commit c3ea7a7

Please sign in to comment.