Refactor: Restructure project package hierarchy and add initial implementation for assembler instructions, shell commands, and exception handling.

This commit is contained in:
2025-08-13 21:42:49 +02:00
parent b103631133
commit 12027fe740
135 changed files with 10835 additions and 31 deletions

View File

@@ -0,0 +1,27 @@
package mtmc.lang.sea.ast;
import mtmc.lang.ParseException;
import mtmc.lang.sea.SeaType;
import mtmc.lang.sea.Token;
import org.jetbrains.annotations.Nullable;
public final class ExpressionSyntaxError extends Expression implements SyntaxError {
@Nullable
public final Expression child;
public final ParseException exception;
public ExpressionSyntaxError(Token token, String message) {
this(null, token, message);
}
public ExpressionSyntaxError(@Nullable Expression child, Token token, String message) {
super(child == null ? token : child.start, token, SeaType.INT);
this.child = child;
this.exception = new ParseException(new ParseException.Message(token, message));
}
@Override
public ParseException exception() {
return exception;
}
}