Skip to content

Commit

Permalink
[v1] Delete sprout AST; remove v1 from AST package path
Browse files Browse the repository at this point in the history
  • Loading branch information
alancai98 committed Nov 4, 2024
1 parent ff87a2a commit 1289a9b
Show file tree
Hide file tree
Showing 116 changed files with 2,271 additions and 8,603 deletions.
8,458 changes: 1,442 additions & 7,016 deletions partiql-ast/api/partiql-ast.api

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions partiql-ast/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,3 @@ publish {
name = "PartiQL AST"
description = "PartiQL's Abstract Syntax Tree"
}

val generate = tasks.register<Exec>("generate") {
dependsOn(":lib:sprout:install")
workingDir(projectDir)
commandLine(
"../lib/sprout/build/install/sprout/bin/sprout", "generate", "kotlin",
"-o", "$buildDir/generated-src",
"-p", "org.partiql.ast",
"-u", "Ast",
"--poems", "factory",
"--poems", "visitor",
"--poems", "builder",
"--poems", "util",
"--opt-in", "org.partiql.value.PartiQLValueExperimental",
"./src/main/resources/partiql_ast.ion"
)
}

tasks.compileKotlin {
dependsOn(generate)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import org.jetbrains.annotations.NotNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import org.jetbrains.annotations.NotNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
package org.partiql.ast.v1;

import org.partiql.ast.v1.expr.Expr;
import org.partiql.ast.v1.expr.ExprAnd;
import org.partiql.ast.v1.expr.ExprArray;
import org.partiql.ast.v1.expr.ExprBag;
import org.partiql.ast.v1.expr.ExprBetween;
import org.partiql.ast.v1.expr.ExprCall;
import org.partiql.ast.v1.expr.ExprCase;
import org.partiql.ast.v1.expr.ExprCast;
import org.partiql.ast.v1.expr.ExprCoalesce;
import org.partiql.ast.v1.expr.ExprExtract;
import org.partiql.ast.v1.expr.ExprInCollection;
import org.partiql.ast.v1.expr.ExprIsType;
import org.partiql.ast.v1.expr.ExprLike;
import org.partiql.ast.v1.expr.ExprLit;
import org.partiql.ast.v1.expr.ExprMatch;
import org.partiql.ast.v1.expr.ExprNot;
import org.partiql.ast.v1.expr.ExprNullIf;
import org.partiql.ast.v1.expr.ExprOperator;
import org.partiql.ast.v1.expr.ExprOr;
import org.partiql.ast.v1.expr.ExprOverlay;
import org.partiql.ast.v1.expr.ExprParameter;
import org.partiql.ast.v1.expr.ExprPath;
import org.partiql.ast.v1.expr.ExprPosition;
import org.partiql.ast.v1.expr.ExprQuerySet;
import org.partiql.ast.v1.expr.ExprRowValue;
import org.partiql.ast.v1.expr.ExprSessionAttribute;
import org.partiql.ast.v1.expr.ExprStruct;
import org.partiql.ast.v1.expr.ExprSubstring;
import org.partiql.ast.v1.expr.ExprTrim;
import org.partiql.ast.v1.expr.ExprValues;
import org.partiql.ast.v1.expr.ExprVarRef;
import org.partiql.ast.v1.expr.ExprVariant;
import org.partiql.ast.v1.expr.ExprWindow;
import org.partiql.ast.v1.expr.PathStep;
import org.partiql.ast.v1.graph.GraphLabel;
import org.partiql.ast.v1.graph.GraphMatch;
import org.partiql.ast.v1.graph.GraphPart;
import org.partiql.ast.v1.graph.GraphPattern;
import org.partiql.ast.v1.graph.GraphQuantifier;
import org.partiql.ast.v1.graph.GraphSelector;
package org.partiql.ast;

import org.partiql.ast.expr.Expr;
import org.partiql.ast.expr.ExprAnd;
import org.partiql.ast.expr.ExprArray;
import org.partiql.ast.expr.ExprBag;
import org.partiql.ast.expr.ExprBetween;
import org.partiql.ast.expr.ExprCall;
import org.partiql.ast.expr.ExprCase;
import org.partiql.ast.expr.ExprCast;
import org.partiql.ast.expr.ExprCoalesce;
import org.partiql.ast.expr.ExprExtract;
import org.partiql.ast.expr.ExprInCollection;
import org.partiql.ast.expr.ExprIsType;
import org.partiql.ast.expr.ExprLike;
import org.partiql.ast.expr.ExprLit;
import org.partiql.ast.expr.ExprMatch;
import org.partiql.ast.expr.ExprNot;
import org.partiql.ast.expr.ExprNullIf;
import org.partiql.ast.expr.ExprOperator;
import org.partiql.ast.expr.ExprOr;
import org.partiql.ast.expr.ExprOverlay;
import org.partiql.ast.expr.ExprParameter;
import org.partiql.ast.expr.ExprPath;
import org.partiql.ast.expr.ExprPosition;
import org.partiql.ast.expr.ExprQuerySet;
import org.partiql.ast.expr.ExprRowValue;
import org.partiql.ast.expr.ExprSessionAttribute;
import org.partiql.ast.expr.ExprStruct;
import org.partiql.ast.expr.ExprSubstring;
import org.partiql.ast.expr.ExprTrim;
import org.partiql.ast.expr.ExprValues;
import org.partiql.ast.expr.ExprVarRef;
import org.partiql.ast.expr.ExprVariant;
import org.partiql.ast.expr.ExprWindow;
import org.partiql.ast.expr.PathStep;
import org.partiql.ast.graph.GraphLabel;
import org.partiql.ast.graph.GraphMatch;
import org.partiql.ast.graph.GraphPart;
import org.partiql.ast.graph.GraphPattern;
import org.partiql.ast.graph.GraphQuantifier;
import org.partiql.ast.graph.GraphSelector;

// TODO docs
// Also include docs on how a library user could create a new variant for sum types and which methods to override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
import org.partiql.ast.v1.expr.ExprVarRef;
import org.partiql.ast.expr.ExprVarRef;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
Expand Down Expand Up @@ -69,6 +69,8 @@ public <R, C> R accept(@NotNull AstVisitor<R, C> visitor, C ctx) {
@Builder(builderClassName = "Builder")
@EqualsAndHashCode(callSuper = false)
public static class StructWildcard extends ExcludeStep {
public StructWildcard() {}

@NotNull
@Override
public Collection<AstNode> children() {
Expand All @@ -87,6 +89,8 @@ public <R, C> R accept(@NotNull AstVisitor<R, C> visitor, C ctx) {
@Builder(builderClassName = "Builder")
@EqualsAndHashCode(callSuper = false)
public static class CollWildcard extends ExcludeStep {
public CollWildcard() {}

@NotNull
@Override
public Collection<AstNode> children() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.partiql.ast.v1.expr.Expr;
import org.partiql.ast.expr.Expr;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.partiql.ast.v1.expr.Expr;
import org.partiql.ast.expr.Expr;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

/**
* TODO docs, equals, hashcode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.partiql.ast.v1.expr.Expr;
import org.partiql.ast.expr.Expr;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
import org.partiql.ast.v1.expr.Expr;
import org.partiql.ast.expr.Expr;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
import org.partiql.ast.v1.expr.Expr;
import org.partiql.ast.expr.Expr;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.partiql.ast.v1.expr.Expr;
import org.partiql.ast.expr.Expr;

import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -70,7 +70,7 @@ public <R, C> R accept(@NotNull AstVisitor<R, C> visitor, C ctx) {
@EqualsAndHashCode(callSuper = false)
public static class SetOp extends QueryBody {
@NotNull
public final org.partiql.ast.v1.SetOp type;
public final org.partiql.ast.SetOp type;

public final boolean isOuter;

Expand All @@ -80,7 +80,7 @@ public static class SetOp extends QueryBody {
@NotNull
public Expr rhs;

public SetOp(@NotNull org.partiql.ast.v1.SetOp type, boolean isOuter, @NotNull Expr lhs, @NotNull Expr rhs) {
public SetOp(@NotNull org.partiql.ast.SetOp type, boolean isOuter, @NotNull Expr lhs, @NotNull Expr rhs) {
this.type = type;
this.isOuter = isOuter;
this.lhs = lhs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

/**
* TODO docs, equals, hashcode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
Expand All @@ -20,9 +20,9 @@ public abstract class SelectItem extends AstNode {
@EqualsAndHashCode(callSuper = false)
public static class Star extends SelectItem {
@NotNull
public final org.partiql.ast.v1.expr.Expr expr;
public final org.partiql.ast.expr.Expr expr;

public Star(@NotNull org.partiql.ast.v1.expr.Expr expr) {
public Star(@NotNull org.partiql.ast.expr.Expr expr) {
this.expr = expr;
}

Expand All @@ -47,12 +47,12 @@ public <R, C> R accept(@NotNull AstVisitor<R, C> visitor, C ctx) {
@EqualsAndHashCode(callSuper = false)
public static class Expr extends SelectItem {
@NotNull
public final org.partiql.ast.v1.expr.Expr expr;
public final org.partiql.ast.expr.Expr expr;

@Nullable
public final Identifier asAlias;

public Expr(@NotNull org.partiql.ast.v1.expr.Expr expr, @Nullable Identifier asAlias) {
public Expr(@NotNull org.partiql.ast.expr.Expr expr, @Nullable Identifier asAlias) {
this.expr = expr;
this.asAlias = asAlias;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.partiql.ast.v1;
package org.partiql.ast;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import org.jetbrains.annotations.NotNull;
import org.partiql.ast.v1.expr.Expr;
import org.partiql.ast.expr.Expr;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Loading

0 comments on commit 1289a9b

Please sign in to comment.