mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-61737 parsing errors for GeneratedParserUtilBase
GitOrigin-RevId: ea58ac2dbb5fdf3e2240339dc324e810cb66b035
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5d016e2ed3
commit
e5f742376b
@@ -303,4 +303,10 @@ tab.title.call.hierarchy=Call Hierarchy
|
||||
action.UpDownAction.up.text=Up
|
||||
action.UpDownAction.down.text=Down
|
||||
button.override=Override
|
||||
button.do.not.override=Do Not Override
|
||||
button.do.not.override=Do Not Override
|
||||
parsing.error.unmatched.input=unmatched input
|
||||
parsing.error.expected=expected
|
||||
parsing.error.expected.got=expected, got
|
||||
parsing.error.unexpected=unexpected
|
||||
parsing.error.and.ellipsis=and ...
|
||||
parsing.error.or=or
|
||||
@@ -780,12 +780,12 @@ public class GeneratedParserUtilBase {
|
||||
|
||||
String actual = trim(builder.getTokenText());
|
||||
if (isEmpty(actual)) {
|
||||
sb.append(empty ? "unmatched input" : " expected");
|
||||
sb.append(empty ? LangBundle.message("parsing.error.unmatched.input") : " " + LangBundle.message("parsing.error.expected"));
|
||||
}
|
||||
else {
|
||||
if (!empty) sb.append(" expected, got ");
|
||||
if (!empty) sb.append(" ").append(LangBundle.message("parsing.error.expected.got")).append(" ");
|
||||
sb.append("'").append(first(actual, MAX_ERROR_TOKEN_TEXT, true)).append("'");
|
||||
if (empty) sb.append(" unexpected");
|
||||
if (empty) sb.append(" ").append(LangBundle.message("parsing.error.unexpected"));
|
||||
}
|
||||
String message = sb.toString();
|
||||
if (advance) {
|
||||
@@ -982,7 +982,7 @@ public class GeneratedParserUtilBase {
|
||||
if (s.length() == 0) continue;
|
||||
if (count++ > 0) {
|
||||
if (count > MAX_VARIANTS_TO_DISPLAY) {
|
||||
sb.append(" and ...");
|
||||
sb.append(" ").append(LangBundle.message("parsing.error.and.ellipsis"));
|
||||
break;
|
||||
}
|
||||
else {
|
||||
@@ -995,7 +995,7 @@ public class GeneratedParserUtilBase {
|
||||
}
|
||||
if (count > 1 && count < MAX_VARIANTS_TO_DISPLAY) {
|
||||
int idx = sb.lastIndexOf(", ");
|
||||
sb.replace(idx, idx + 1, " or");
|
||||
sb.replace(idx, idx + 1, " " + LangBundle.message("parsing.error.or"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user