mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 10:20:41 +00:00
Checkstyle-Fehler behoben
This commit is contained in:
parent
15134d544d
commit
cf00fb803b
1
pom.xml
1
pom.xml
@ -163,7 +163,6 @@
|
|||||||
<configLocation>${project.build.directory}/../src/test/resources/checkstyle.xml</configLocation>
|
<configLocation>${project.build.directory}/../src/test/resources/checkstyle.xml</configLocation>
|
||||||
<failOnViolation>true</failOnViolation>
|
<failOnViolation>true</failOnViolation>
|
||||||
<violationSeverity>warning</violationSeverity>
|
<violationSeverity>warning</violationSeverity>
|
||||||
<sourceDirectories>${project.build.directory}/../src/main/java</sourceDirectories>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
@ -27,7 +27,7 @@ public class LambdaParser {
|
|||||||
*/
|
*/
|
||||||
private Token token;
|
private Token token;
|
||||||
|
|
||||||
private static final Set<TokenType> atomStartTokens
|
private static final Set<TokenType> ATOM_START_TOKENS
|
||||||
= EnumSet.of(TokenType.VARIABLE, TokenType.NUMBER, TokenType.TRUE,
|
= EnumSet.of(TokenType.VARIABLE, TokenType.NUMBER, TokenType.TRUE,
|
||||||
TokenType.FALSE, TokenType.LP);
|
TokenType.FALSE, TokenType.LP);
|
||||||
|
|
||||||
@ -97,11 +97,11 @@ public class LambdaParser {
|
|||||||
nextToken();
|
nextToken();
|
||||||
Result<VarTerm, ParseError> var = parseVar();
|
Result<VarTerm, ParseError> var = parseVar();
|
||||||
if (!expect(TokenType.DOT)) {
|
if (!expect(TokenType.DOT)) {
|
||||||
// TODO
|
return new Result<>(null, ParseError.UNEXPECTED_TOKEN);
|
||||||
}
|
}
|
||||||
Result<LambdaTerm, ParseError> body = parseTerm();
|
Result<LambdaTerm, ParseError> body = parseTerm();
|
||||||
// TODO: Fehlerbehandlung
|
// TODO: Fehlerbehandlung
|
||||||
return new Result(new AbsTerm(var.unwrap(), body.unwrap()));
|
return new Result<>(new AbsTerm(var.unwrap(), body.unwrap()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -110,7 +110,7 @@ public class LambdaParser {
|
|||||||
*/
|
*/
|
||||||
private Result<LambdaTerm, ParseError> parseApplication() {
|
private Result<LambdaTerm, ParseError> parseApplication() {
|
||||||
LambdaTerm left = parseAtom().unwrap(); // TODO: Fehlerbehandlung
|
LambdaTerm left = parseAtom().unwrap(); // TODO: Fehlerbehandlung
|
||||||
while (atomStartTokens.contains(token.getType())) {
|
while (ATOM_START_TOKENS.contains(token.getType())) {
|
||||||
LambdaTerm atom = parseAtom().unwrap(); // TODO: Fehlerbehandlung
|
LambdaTerm atom = parseAtom().unwrap(); // TODO: Fehlerbehandlung
|
||||||
left = new AppTerm(left, atom);
|
left = new AppTerm(left, atom);
|
||||||
}
|
}
|
||||||
|
@ -12,8 +12,12 @@ public class VarTerm extends LambdaTerm {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if (this == o) {
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
VarTerm varTerm = (VarTerm) o;
|
VarTerm varTerm = (VarTerm) o;
|
||||||
return Objects.equals(name, varTerm.name);
|
return Objects.equals(name, varTerm.name);
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,4 @@ server.port=${PORT:8080}
|
|||||||
logging.level.org.atmosphere = warn
|
logging.level.org.atmosphere = warn
|
||||||
spring.mustache.check-template-location = false
|
spring.mustache.check-template-location = false
|
||||||
|
|
||||||
# To improve the performance during development.
|
|
||||||
# For more information https://vaadin.com/docs/flow/spring/tutorial-spring-configuration.html#special-configuration-parameters
|
|
||||||
# vaadin.whitelisted-packages= org/vaadin/example
|
# vaadin.whitelisted-packages= org/vaadin/example
|
||||||
|
@ -10,14 +10,15 @@
|
|||||||
<property name="tabWidth" value="4"/>
|
<property name="tabWidth" value="4"/>
|
||||||
<module name="JavadocType">
|
<module name="JavadocType">
|
||||||
<property name="scope" value="package"/>
|
<property name="scope" value="package"/>
|
||||||
<!-->property name="allowUndeclaredRTE" value="true"/-->
|
<property name="severity" value="info"/>
|
||||||
<!-->property name="suppressLoadErrors" value="true"/-->
|
|
||||||
</module>
|
</module>
|
||||||
<module name="JavadocMethod">
|
<module name="JavadocMethod">
|
||||||
<property name="scope" value="package"/>
|
<property name="scope" value="package"/>
|
||||||
|
<property name="severity" value="info"/>
|
||||||
</module>
|
</module>
|
||||||
<module name="JavadocVariable">
|
<module name="JavadocVariable">
|
||||||
<property name="scope" value="public"/>
|
<property name="scope" value="public"/>
|
||||||
|
<property name="severity" value="info"/>
|
||||||
</module>
|
</module>
|
||||||
<module name="ConstantName"/>
|
<module name="ConstantName"/>
|
||||||
<module name="LocalFinalVariableName"/>
|
<module name="LocalFinalVariableName"/>
|
||||||
@ -27,7 +28,6 @@
|
|||||||
<module name="ParameterName"/>
|
<module name="ParameterName"/>
|
||||||
<module name="StaticVariableName"/>
|
<module name="StaticVariableName"/>
|
||||||
<module name="TypeName"/>
|
<module name="TypeName"/>
|
||||||
<module name="AvoidStarImport"/>
|
|
||||||
<module name="IllegalImport"/>
|
<module name="IllegalImport"/>
|
||||||
<module name="RedundantImport"/>
|
<module name="RedundantImport"/>
|
||||||
<module name="UnusedImports"/>
|
<module name="UnusedImports"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user