mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-28 09:08:05 +00:00
made interfaces sealed
This commit is contained in:
parent
9738fee630
commit
e14af08678
@ -1,6 +1,14 @@
|
||||
package de.maishai.ast;
|
||||
|
||||
|
||||
import de.maishai.ast.records.Assignment;
|
||||
import de.maishai.ast.records.Binary;
|
||||
import de.maishai.ast.records.BoolConstant;
|
||||
import de.maishai.ast.records.CharConstant;
|
||||
import de.maishai.ast.records.Id;
|
||||
import de.maishai.ast.records.IntConstant;
|
||||
import de.maishai.ast.records.MethodCall;
|
||||
import de.maishai.ast.records.New;
|
||||
|
||||
public interface Expression extends Node {
|
||||
public sealed interface Expression extends Node permits Assignment, Binary, BoolConstant, CharConstant, Id, IntConstant, MethodCall, New {
|
||||
}
|
||||
|
@ -1,4 +1,12 @@
|
||||
package de.maishai.ast;
|
||||
|
||||
public interface Node {
|
||||
import de.maishai.ast.records.Block;
|
||||
import de.maishai.ast.records.Class;
|
||||
import de.maishai.ast.records.MainMethod;
|
||||
import de.maishai.ast.records.Method;
|
||||
import de.maishai.ast.records.Parameter;
|
||||
import de.maishai.ast.records.Program;
|
||||
import de.maishai.ast.records.Variable;
|
||||
|
||||
public sealed interface Node permits Expression, Statement, Block, Class, MainMethod, Method, Parameter, Program, Variable {
|
||||
}
|
||||
|
@ -1,3 +1,15 @@
|
||||
package de.maishai.ast;
|
||||
public interface Statement extends Node {
|
||||
|
||||
import de.maishai.ast.records.Break;
|
||||
import de.maishai.ast.records.Continue;
|
||||
import de.maishai.ast.records.DoWhile;
|
||||
import de.maishai.ast.records.For;
|
||||
import de.maishai.ast.records.IfElse;
|
||||
import de.maishai.ast.records.MethodCall;
|
||||
import de.maishai.ast.records.New;
|
||||
import de.maishai.ast.records.Return;
|
||||
import de.maishai.ast.records.ReturnVoid;
|
||||
import de.maishai.ast.records.While;
|
||||
|
||||
public sealed interface Statement extends Node permits Break, Continue, DoWhile, For, IfElse, MethodCall, New, Return, ReturnVoid, While {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user