More refactoring

This commit is contained in:
Astrash
2023-07-23 17:55:29 +10:00
parent f3d1751c87
commit 76728fe593
61 changed files with 317 additions and 301 deletions

View File

@@ -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());

View File

@@ -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;
}