Skip to content

Commit 5d21b19

Browse files
committed
Working on clean-up.
1 parent 006d640 commit 5d21b19

File tree

5 files changed

+8
-47
lines changed

5 files changed

+8
-47
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.byteskript</groupId>
88
<artifactId>byteskript</artifactId>
9-
<version>1.0.16</version>
9+
<version>1.0.17</version>
1010
<name>ByteSkript</name>
1111
<description>A compiled JVM implementation of the Skript language.</description>
1212

@@ -92,7 +92,7 @@
9292
<dependency>
9393
<groupId>mx.kenzie</groupId>
9494
<artifactId>jupiter</artifactId>
95-
<version>1.0.0</version>
95+
<version>1.0.2</version>
9696
<scope>compile</scope>
9797
</dependency>
9898
<dependency>

src/main/java/org/byteskript/skript/compiler/AutomaticValueExpression.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/main/java/org/byteskript/skript/compiler/InlineController.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private void prepareVariables(Method method) {
3838
final SyntaxElement element = inputs[i].current();
3939
if (element.getClass() != VariableExpression.class) continue;
4040
final VariableExpression expression = (VariableExpression) inputs[i].current();
41-
special.put(i, expression.getVariable(context, inputs[i].match()));
41+
this.special.put(i, expression.getVariable(context, inputs[i].match()));
4242
}
4343
final MethodBuilder builder = context.getMethod();
4444
for (int i = method.getParameterTypes().length - 1; i >= 0; i--) {
@@ -47,7 +47,7 @@ private void prepareVariables(Method method) {
4747
continue;
4848
}
4949
final PreVariable var = new PreVariable("$unspec_" + i);
50-
context.forceUnspecVariable(var);
50+
this.context.forceUnspecVariable(var);
5151
final int slot = context.slotOf(var);
5252
builder.writeCode(WriteInstruction.storeObject(slot));
5353
}
@@ -88,15 +88,6 @@ public int adjustVariable(int i) {
8888
@Override
8989
public WriteInstruction return0(int opcode) {
9090
return this.jumpToEnd();
91-
// if (opcode < 177) {
92-
// int slot = this.returnSlot();
93-
// return (writer, visitor) -> {
94-
// visitor.visitVarInsn(opcode - 118, slot);
95-
// this.jumpToEnd().accept(writer, visitor);
96-
// };
97-
// } else {
98-
// return this.jumpToEnd();
99-
// }
10091
}
10192

10293
@Override

src/main/java/org/byteskript/skript/compiler/Unit.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@
88

99
import org.byteskript.skript.api.LanguageElement;
1010

11-
public class Unit {
12-
13-
final LanguageElement type;
14-
15-
public Unit(LanguageElement type) {
16-
this.type = type;
17-
}
18-
19-
public LanguageElement getType() {
20-
return type;
21-
}
22-
23-
11+
public record Unit(LanguageElement type) {
12+
2413
}

src/test/java/org/byteskript/skript/test/MainTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
public class MainTest extends SkriptTest {
1414

1515
private static final Skript skript = new Skript();
16-
private static Script script;
1716

18-
public static void main(String[] args) throws Throwable {
17+
public static void main(String[] args) {
1918
final PostCompileClass cls = skript.compileScript(FlowTest.class.getClassLoader()
2019
.getResourceAsStream("main.bsk"), "skript.main");
21-
script = skript.loadScript(cls);
20+
Script script = skript.loadScript(cls);
2221
new ExampleController(skript).run();
2322
System.out.println("Finished.");
2423
}

0 commit comments

Comments
 (0)