Skip to content

Implement pretty-printing ReQL AST #15

@NotJustAnna

Description

@NotJustAnna

This issue is a continuation of rethinkdb/rethinkdb#5012

Implement ReQL AST printing. It is fairly easy.

Base code (taken from Avarel/Kaiper:Kaiper-AST/xyz.avarel.kaiper.ast.Expr, Apache-2.0 License)

    public void ast(StringBuilder builder, String indent, boolean isTail) {
        builder.append(indent).append(isTail ? "└── " : "├── ").append(toString());
    }

    public void ast(String label, StringBuilder builder, String indent, boolean tail) {
        builder.append(indent).append(tail ? "└── " : "├── ").append(label).append(':');

        builder.append('\n');
        ast(builder, indent + (tail ? "    " : "│   "), true);
    }

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions