Update formatter settings
This commit is contained in:
parent
6cd5fb66a4
commit
e8e9d2e12d
|
@ -15,7 +15,9 @@ public abstract class LineColumnException extends LispException {
|
|||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return format("{0} - line {1}, column {2}", getMessagePrefix(), position.getLineNumber(),
|
||||
return format("{0} - line {1}, column {2}",
|
||||
getMessagePrefix(),
|
||||
position.getLineNumber(),
|
||||
position.getColumnNumber());
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,9 @@ public class ArgumentValidator {
|
|||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return format("{0}: {1} is not the expected type of ''{2}''", functionName, argument,
|
||||
return format("{0}: {1} is not the expected type of ''{2}''",
|
||||
functionName,
|
||||
argument,
|
||||
getExpectedTypeName());
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,8 @@ public class UserDefinedFunction extends LispFunction {
|
|||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return format("unexpected parameters following ''&rest'' in definition of {0}: {1}", functionName,
|
||||
return format("unexpected parameters following ''&rest'' in definition of {0}: {1}",
|
||||
functionName,
|
||||
parameters);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,15 @@ public interface TailCall<T> {
|
|||
}
|
||||
|
||||
default T invoke() {
|
||||
return Stream.iterate(this, TailCall::apply).filter(TailCall::isComplete).findFirst().get().result();
|
||||
// @formatter:off
|
||||
|
||||
return Stream.iterate(this, TailCall::apply)
|
||||
.filter(TailCall::isComplete)
|
||||
.findFirst()
|
||||
.get()
|
||||
.result();
|
||||
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
}
|
|
@ -61,7 +61,8 @@ public class BackquoteEvaluatorTest {
|
|||
|
||||
@Test
|
||||
public void evaluateListWithComma() {
|
||||
SExpression input = makeList(new CommaExpression(makeList(new Symbol("+"), new LispNumber("1"),
|
||||
SExpression input = makeList(new CommaExpression(makeList(new Symbol("+"),
|
||||
new LispNumber("1"),
|
||||
new LispNumber("9"))));
|
||||
BackquoteEvaluator evaluator = createBackquoteEvaluator(input);
|
||||
|
||||
|
@ -133,11 +134,17 @@ public class BackquoteEvaluatorTest {
|
|||
Cons list2 = makeList(new Symbol("+"), new LispNumber("20"), new LispNumber("5"));
|
||||
Cons list3 = makeList(new Symbol("LIST"), new LispNumber("7"), new LispNumber("6"));
|
||||
|
||||
SExpression input = makeList(new LispNumber("78"), new CommaExpression(new AtSignExpression(list1)),
|
||||
new CommaExpression(list2), new CommaExpression(list3), new LispString("\"sky\""));
|
||||
SExpression input = makeList(new LispNumber("78"),
|
||||
new CommaExpression(new AtSignExpression(list1)),
|
||||
new CommaExpression(list2),
|
||||
new CommaExpression(list3),
|
||||
new LispString("\"sky\""));
|
||||
|
||||
SExpression expected = makeList(new LispNumber("78"), new LispNumber("1"), new LispNumber("9"),
|
||||
new LispNumber("25"), makeList(new LispNumber("7"), new LispNumber("6")),
|
||||
SExpression expected = makeList(new LispNumber("78"),
|
||||
new LispNumber("1"),
|
||||
new LispNumber("9"),
|
||||
new LispNumber("25"),
|
||||
makeList(new LispNumber("7"), new LispNumber("6")),
|
||||
new LispString("\"sky\""));
|
||||
|
||||
BackquoteEvaluator evaluator = createBackquoteEvaluator(input);
|
||||
|
|
Loading…
Reference in New Issue