mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-09 10:50:42 +00:00
Merge branch 'master' of https://git.scc.kit.edu/pse-typinferenz/typicalc
This commit is contained in:
commit
602f6e04c4
@ -61,19 +61,18 @@ public class ErrorView extends VerticalLayout implements LocaleChangeObserver {
|
|||||||
case UNEXPECTED_TOKEN:
|
case UNEXPECTED_TOKEN:
|
||||||
Optional<Token> cause = error.getCause();
|
Optional<Token> cause = error.getCause();
|
||||||
if (cause.isPresent()) {
|
if (cause.isPresent()) {
|
||||||
additionalInformation.add(new Span(new Pre(getTranslation("root.term") + term)));
|
additionalInformation.add(new Span(new Pre(getTranslation("root.termForError") + term
|
||||||
additionalInformation.add(
|
+ "\n" + " ".repeat(Math.max(getTranslation("root.termForError").length(),
|
||||||
new Span(new Pre(" ".repeat(Math.max(getTranslation("root.term").length(),
|
cause.get().getPos() + getTranslation("root.termForError").length()))
|
||||||
cause.get().getPos() + "root.term".length()))
|
|
||||||
+ "^ " + getTranslation("root.wrongCharacter") + cause.get().getText())));
|
+ "^ " + getTranslation("root.wrongCharacter") + cause.get().getText())));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UNEXPECTED_CHARACTER:
|
case UNEXPECTED_CHARACTER:
|
||||||
char c = error.getWrongCharacter();
|
char c = error.getWrongCharacter();
|
||||||
if (c != '\0') {
|
if (c != '\0') {
|
||||||
additionalInformation.add(new Span(new Pre(getTranslation("root.term") + term)));
|
additionalInformation.add(new Span(new Pre(getTranslation("root.termForError") + term
|
||||||
additionalInformation.add(new Span(new Pre(" ".repeat(Math.max(getTranslation("root.term").length(),
|
+ "\n" + " ".repeat(Math.max(getTranslation("root.termForError").length(),
|
||||||
error.getPosition() + "root.term".length()))
|
error.getPosition() + getTranslation("root.termForError").length()))
|
||||||
+ "^ " + getTranslation("root.wrongCharacter") + c)));
|
+ "^ " + getTranslation("root.wrongCharacter") + c)));
|
||||||
} else {
|
} else {
|
||||||
return summary;
|
return summary;
|
||||||
@ -106,7 +105,7 @@ public class ErrorView extends VerticalLayout implements LocaleChangeObserver {
|
|||||||
getTranslation("error.expectedToken", correct))));
|
getTranslation("error.expectedToken", correct))));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Div(summary, additionalInformation);
|
return new Div(additionalInformation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,7 +105,7 @@ root.tooFewTokensHelp=Überprüfe, ob alle Let-, Abs- und App-Terme über die n
|
|||||||
root.UNEXPECTED_TOKEN=Die Eingabe entspricht nicht der im Info-Dialog spezifizierten Syntax!
|
root.UNEXPECTED_TOKEN=Die Eingabe entspricht nicht der im Info-Dialog spezifizierten Syntax!
|
||||||
root.UNEXPECTED_CHARACTER=Die Eingabe enthält ein Zeichen, welches an dieser Stelle nicht erlaubt ist!
|
root.UNEXPECTED_CHARACTER=Die Eingabe enthält ein Zeichen, welches an dieser Stelle nicht erlaubt ist!
|
||||||
error.heading=Syntaktisch falsche Eingabe!
|
error.heading=Syntaktisch falsche Eingabe!
|
||||||
root.term=Eingabe:\u0020
|
root.termForError=Term:\u0020
|
||||||
root.wrongCharacter=Falsches Zeichen:\u0020
|
root.wrongCharacter=Falsches Zeichen:\u0020
|
||||||
error.expectedToken=Erwartet: {0}
|
error.expectedToken=Erwartet: {0}
|
||||||
error.hint=Die Grammatiken, die die korrekte Syntax eines Terms und der Typannahmen beschreiben, \
|
error.hint=Die Grammatiken, die die korrekte Syntax eines Terms und der Typannahmen beschreiben, \
|
||||||
|
@ -99,7 +99,7 @@ root.UNEXPECTED_TOKEN=The input does not match the syntax specified in the info
|
|||||||
root.UNEXPECTED_CHARACTER=The input contains a character which is not allowed at this position.
|
root.UNEXPECTED_CHARACTER=The input contains a character which is not allowed at this position.
|
||||||
error.heading=Input is syntactically wrong!
|
error.heading=Input is syntactically wrong!
|
||||||
root.wrongCharacter=Wrong character:\u0020
|
root.wrongCharacter=Wrong character:\u0020
|
||||||
root.term=Input:\u0020
|
root.termForError=Term:\u0020
|
||||||
error.expectedToken=Expected: {0}
|
error.expectedToken=Expected: {0}
|
||||||
error.hint=The grammars describing the correct syntax of a term or a type assumption can also be reached \
|
error.hint=The grammars describing the correct syntax of a term or a type assumption can also be reached \
|
||||||
via the info icon.
|
via the info icon.
|
||||||
|
Loading…
Reference in New Issue
Block a user