Skip to content

Conversation

sevki
Copy link

@sevki sevki commented Sep 18, 2025

Product change and motivation

  • feat:Make pretty public.
  • fix: Pretty now prints annotations.
  • fix: suppress some build warnings.
  • feat: add derive(Quine) to AST members.

Implementation

Adds an optional quine derive feature to the package that will implement Quine
for the AST to make it possible for the ASTs to reproduce them selves.

@sevki
Copy link
Author

sevki commented Sep 18, 2025

ha. the annotation fix is already in. didn't realize that.

use std::fmt;

#[cfg(feature = "quine")]
use {polyquine::Quine, proc_macro2::TokenStream};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quine is a pretty old package - is it maintained?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's polyquine, not quine. it's actually maintained. I've contributed a couple of patches to make this bit of code work

#[derive(Debug, Eq, PartialEq)]
#[cfg_attr(feature = "quine", derive(Quine), path_prefix(typeql::query::schema))]
pub struct Define {
    pub span: Option<Span>,
    pub definables: Vec<Definable>,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants