Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions nb-configuration.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<netbeans.compile.on.save>all</netbeans.compile.on.save>
</properties>
</project-shared-configuration>
46 changes: 46 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,28 @@
<version>3.0.10</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.12.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>



<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -107,6 +127,32 @@
</execution>
</executions>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.6.3</version>
</requireMavenVersion>
<requireJavaVersion>
<version>21</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/editor/CanvasFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ protected void paintComponent(Graphics g) {
g2.setColor(Color.BLACK);
gfx = g2;
if (!Compiler.main_loop.isEmpty()) {
Context.top.pushStack();
Context.top.putLocal("dt", new PiccodeNumber(String.format("%s", deltaTime)));
try {
AccessFrame.msgs.setText("");
Expand All @@ -116,6 +117,8 @@ protected void paintComponent(Graphics g) {
System.out.println("ERROR: " + e.getMessage());
e.printStackTrace();
Compiler.main_loop.clear();
} finally {
Context.top.dropStackFrame();
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/piccode/backend/Compiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public static void compile(String code, boolean render) {
} catch (Exception rte) {
rte.printStackTrace();
AccessFrame.writeError(rte.getMessage());
} finally {
Context.top.dropStackFrame();
}
}

Expand Down