package coffee.liz.lambda.ast; /** * Represents source code in one of the supported lambda calculus syntaxes. */ public sealed interface SourceCode { static SourceCode ofLambda(final String source) { return new Lambda(source); } static SourceCode ofArrow(final String source) { return new Arrow(source); } record Lambda(String source) implements SourceCode { } record Arrow(String source) implements SourceCode { } /** * Supported syntax types for {@link SourceCode}. */ enum Syntax { LAMBDA, ARROW } }