mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-05 23:36:06 +00:00
More refactoring
This commit is contained in:
@@ -11,13 +11,13 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.StringReader;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.PeekableStream;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.LookaheadStream;
|
||||
|
||||
|
||||
public class PeekableStreamTest {
|
||||
public class LookaheadStreamTest {
|
||||
@Test
|
||||
public void lookahead() {
|
||||
PeekableStream lookahead = new PeekableStream(new StringReader("Test string..."));
|
||||
LookaheadStream lookahead = new LookaheadStream(new StringReader("Test string..."));
|
||||
|
||||
for(int i = 0; lookahead.next(i) != null; i++) {
|
||||
System.out.print(lookahead.next(i).getCharacter());
|
||||
|
||||
@@ -77,9 +77,9 @@ public class ParserTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void invoke(ImplementationArguments implementationArguments, Scope scope) {
|
||||
System.out.println("string: " + a.invoke(implementationArguments, scope) + ", double: " +
|
||||
b.invoke(implementationArguments, scope));
|
||||
public Void evaluate(ImplementationArguments implementationArguments, Scope scope) {
|
||||
System.out.println("string: " + a.evaluate(implementationArguments, scope) + ", double: " +
|
||||
b.evaluate(implementationArguments, scope));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user