mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-10 03:10:44 +00:00
use constant instead of magic string
This commit is contained in:
parent
a01811936e
commit
09ce138bc2
@ -38,6 +38,7 @@ public final class LatexCreatorConstants {
|
||||
protected static final String USER_VARIABLE = "\\tau";
|
||||
protected static final String GAMMA = "\\Gamma";
|
||||
|
||||
protected static final String PHANTOM_X = "\\phantom{x}";
|
||||
protected static final String SUBSTITUTION_SIGN = "\\mathrel{\\unicode{x21E8}}";
|
||||
protected static final String LAMBDA = "\\lambda";
|
||||
protected static final String LATEX_SPACE = "\\ ";
|
||||
|
@ -13,15 +13,13 @@ public class LatexCreatorConstraints implements StepVisitor {
|
||||
|
||||
public LatexCreatorConstraints(TypeInfererInterface typeInferer) {
|
||||
constraints = new ArrayList<>();
|
||||
constraints.add("\\phantom{x}");
|
||||
constraints.add(PHANTOM_X);
|
||||
typeInferer.getFirstInferenceStep().accept(this);
|
||||
}
|
||||
|
||||
protected List<String> getConstraints() {
|
||||
List<String> temp = new ArrayList<>(constraints);
|
||||
temp.replaceAll(current -> current.equals("")
|
||||
? current
|
||||
: DOLLAR_SIGN + current + DOLLAR_SIGN);
|
||||
temp.replaceAll(current -> DOLLAR_SIGN + current + DOLLAR_SIGN);
|
||||
//todo vllt. noch was anderes drumrum schreiben
|
||||
return temp;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user