Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement pretty-printing ReQL AST #15

Closed
NotJustAnna opened this issue Feb 15, 2020 · 1 comment · Fixed by #7
Closed

Implement pretty-printing ReQL AST #15

NotJustAnna opened this issue Feb 15, 2020 · 1 comment · Fixed by #7
Assignees
Labels
enhancement New feature or request

Comments

@NotJustAnna
Copy link
Member

NotJustAnna commented Feb 15, 2020

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);
    }
@NotJustAnna NotJustAnna added bug Something isn't working help wanted Extra attention is needed labels Feb 15, 2020
@NotJustAnna NotJustAnna self-assigned this Feb 15, 2020
@NotJustAnna
Copy link
Member Author

Implemented in develop/experimental (#7)

@NotJustAnna NotJustAnna linked a pull request Feb 15, 2020 that will close this issue
@NotJustAnna NotJustAnna added enhancement New feature or request and removed bug Something isn't working help wanted Extra attention is needed labels Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant