forked from Displee/cs2-editor
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Split project up into new frontend and backend modules
- Loading branch information
Showing
131 changed files
with
154 additions
and
8,120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
plugins { | ||
kotlin("jvm") version "1.7.10" | ||
} | ||
|
||
dependencies { | ||
implementation("com.displee:disio:2.2") | ||
implementation("com.displee:rs-cache-library:6.8.1") | ||
implementation("org.apache.commons:commons-lang3:3.12.0") | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...main/java/dawn/cs2/ControlFlowSolver.java → ...main/java/dawn/cs2/ControlFlowSolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package dawn.cs2; | ||
|
||
import dawn.cs2.ast.*; | ||
import dawn.cs2.ast.*; | ||
|
||
import java.util.ArrayList; | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...java/dawn/cs2/ast/CharExpressionNode.java → ...java/dawn/cs2/ast/CharExpressionNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...main/java/dawn/cs2/ast/LocalVariable.java → ...main/java/dawn/cs2/ast/LocalVariable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package dawn.cs2.ast; | ||
|
||
public enum Operator { | ||
|
||
PLUS("+", ExpressionNode.PRIORITY_ADDSUB, MathExpressionNode.class, 2), | ||
MINUS("-", ExpressionNode.PRIORITY_ADDSUB, MathExpressionNode.class, 2), | ||
MUL("*", ExpressionNode.PRIORITY_MULDIVREM, MathExpressionNode.class, 2), | ||
DIV("/", ExpressionNode.PRIORITY_MULDIVREM, MathExpressionNode.class, 2), | ||
REM("%", ExpressionNode.PRIORITY_MULDIVREM, MathExpressionNode.class, 2), | ||
//TODO: | ||
PLUSPREFIX("++", ExpressionNode.PRIORITY_PLUSMINUSPREFIXPOSTFIX, ExpressionNode.class, 1, true, false), | ||
PLUSPOSTFIX("++", ExpressionNode.PRIORITY_PLUSMINUSPREFIXPOSTFIX, ExpressionNode.class, 1), | ||
MINUSPREFIX("--", ExpressionNode.PRIORITY_PLUSMINUSPREFIXPOSTFIX, ExpressionNode.class, 1, true, false), | ||
MINUSPOSTFIX("--", ExpressionNode.PRIORITY_PLUSMINUSPREFIXPOSTFIX, ExpressionNode.class, 1), | ||
UNARYMINUS("-", ExpressionNode.PRIORITY_UNARYPLUSMINUS, ExpressionNode.class, 1, true, false), | ||
UNARYPLUS("+", ExpressionNode.PRIORITY_UNARYPLUSMINUS, ExpressionNode.class, 1, true, false), | ||
UNARYNOT("!", ExpressionNode.PRIORITY_UNARYLOGICALNOT, ExpressionNode.class, 1, true, false), | ||
EQ("==", ExpressionNode.PRIORITY_EQNE, ConditionalExpressionNode.class, 2), | ||
NEQ("!=", ExpressionNode.PRIORITY_EQNE, ConditionalExpressionNode.class, 2), | ||
GT(">", ExpressionNode.PRIORITY_LELTGEGTINSTANCEOF, ConditionalExpressionNode.class, 2), | ||
GE(">=", ExpressionNode.PRIORITY_LELTGEGTINSTANCEOF, ConditionalExpressionNode.class, 2), | ||
LT("<", ExpressionNode.PRIORITY_LELTGEGTINSTANCEOF, ConditionalExpressionNode.class, 2), | ||
LE("<=", ExpressionNode.PRIORITY_LELTGEGTINSTANCEOF, ConditionalExpressionNode.class, 2), | ||
OR("||", ExpressionNode.PRIORITY_LOGICALOR, ConditionalExpressionNode.class, 2), | ||
AND("&&", ExpressionNode.PRIORITY_LOGICALAND, ConditionalExpressionNode.class, 2), | ||
ASSIGN("=", ExpressionNode.PRIORITY_ASSIGNMENT, VariableAssignationNode.class, 2, false, true), | ||
//TODO: += etc | ||
|
||
DUMMY_OP("", 99, ExpressionNode.class, 0); | ||
|
||
|
||
public final String text; | ||
public final int priority; | ||
public final Class<? extends ExpressionNode> type; | ||
public final int operands; | ||
public boolean prefix; | ||
public boolean assocRight; | ||
|
||
Operator(String text, int prio, Class<? extends ExpressionNode> type, int operands) { | ||
this(text, prio, type, operands, false, false); | ||
} | ||
|
||
Operator(String text, int prio, Class<? extends ExpressionNode> type, int operands, boolean prefix, boolean assocRight) { | ||
this.text = text; | ||
this.priority = prio; | ||
this.type = type; | ||
this.operands = operands; | ||
this.prefix = prefix; | ||
this.assocRight = assocRight; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return text; | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...va/dawn/cs2/ast/StringExpressionNode.java → ...va/dawn/cs2/ast/StringExpressionNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/main/java/dawn/cs2/ast/Underscore.java → ...rc/main/java/dawn/cs2/ast/Underscore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
...dawn/cs2/instructions/IntInstruction.java → ...dawn/cs2/instructions/IntInstruction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...main/java/dawn/cs2/util/FunctionInfo.java → ...main/java/dawn/cs2/util/FunctionInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,35 @@ | ||
import org.gradle.jvm.tasks.Jar | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
val javaVersion = JavaVersion.VERSION_17 | ||
|
||
plugins { | ||
java | ||
base | ||
kotlin("jvm") version "1.7.10" | ||
id("org.openjfx.javafxplugin") version "0.0.13" | ||
} | ||
|
||
group = "cs2-editor" | ||
version = "1.5" | ||
|
||
val gprUser: String? = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") ?: System.getenv("GITHUB_ACTOR") | ||
val gprKey: String? = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") ?: System.getenv("GITHUB_TOKEN") | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
url = uri("https://maven.pkg.github.com/blurite/rscm-maven") | ||
credentials { | ||
username = gprUser | ||
password = gprKey | ||
allprojects { | ||
group = "cs2-editor" | ||
version = "1.5" | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
plugins.withType<JavaPlugin> { | ||
configure<JavaPluginExtension> { | ||
sourceCompatibility = javaVersion | ||
targetCompatibility = javaVersion | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.7.10") | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") | ||
implementation("com.displee:disio:2.2") | ||
implementation("com.displee:rs-cache-library:6.8.1") | ||
if (gprUser != null) { | ||
implementation("io.blurite:rscm:1.0") | ||
|
||
tasks.withType<JavaCompile> { | ||
options.encoding = "UTF-8" | ||
options.release.set(javaVersion.toString().toInt()) | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = javaVersion.toString() | ||
} | ||
} | ||
implementation("org.fxmisc.richtext:richtextfx:0.10.9") | ||
implementation("com.google.code.gson:gson:2.9.0") | ||
implementation("org.apache.commons:commons-lang3:3.12.0") | ||
} | ||
|
||
javafx { | ||
modules = listOf("javafx.controls", "javafx.fxml") | ||
} | ||
|
||
tasks.withType<Jar> { | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
|
||
destinationDirectory.set(file(rootDir)) | ||
manifest.attributes["Main-Class"] = "com.displee.editor.EditorKt" | ||
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) }) | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
kotlinOptions.jvmTarget = "17" | ||
} | ||
|
||
tasks.withType<JavaCompile> { | ||
options.encoding = "UTF-8" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
plugins { | ||
kotlin("jvm") version "1.7.10" | ||
id("org.openjfx.javafxplugin") version "0.0.13" | ||
} | ||
|
||
val gprUser: String? = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") ?: System.getenv("GITHUB_ACTOR") | ||
val gprKey: String? = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") ?: System.getenv("GITHUB_TOKEN") | ||
|
||
repositories { | ||
maven { | ||
url = uri("https://maven.pkg.github.com/blurite/rscm-maven") | ||
credentials { | ||
username = gprUser | ||
password = gprKey | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(projects.backend) | ||
|
||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") | ||
implementation("com.displee:disio:2.2") | ||
implementation("com.displee:rs-cache-library:6.8.1") | ||
if (gprUser != null) { | ||
implementation("io.blurite:rscm:1.0") | ||
} | ||
implementation("org.fxmisc.richtext:richtextfx:0.10.9") | ||
implementation("com.google.code.gson:gson:2.9.0") | ||
} | ||
|
||
javafx { | ||
modules = listOf("javafx.controls", "javafx.fxml") | ||
} | ||
|
||
tasks.withType<Jar> { | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
|
||
destinationDirectory.set(file(rootDir)) | ||
manifest.attributes["Main-Class"] = "com.displee.editor.EditorKt" | ||
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
rootProject.name = "cs2-release" | ||
rootProject.name = "cs2-editor" | ||
|
||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") | ||
|
||
include("frontend", "backend") |
Oops, something went wrong.