Skip to content

Commit

Permalink
Don't colorize top-level lets
Browse files Browse the repository at this point in the history
  • Loading branch information
timsueberkrueb committed Mar 22, 2024
1 parent 671bcc3 commit 032a6ad
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion lang/printer/src/render/latex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ where
Anno::Ctor => "\\polCtor{",
Anno::Dtor => "\\polDtor{",
Anno::Type => "\\polType{",
Anno::Identifier => "\\polCtor{", // TODO: Change this?
Anno::Comment => "\\polComment{",
// Produce a backslash
Anno::Backslash => "\\polBackslash{",
Expand Down
2 changes: 0 additions & 2 deletions lang/printer/src/render/termcolor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const KEYWORD: Color = Color::Magenta;
const CTOR: Color = Color::Blue;
const DTOR: Color = Color::Green;
const TYPE: Color = Color::Red;
const IDENTIFIER: Color = Color::Blue; // TODO: Change this?
const COMMENT: Color = Color::Cyan;
const ERROR: Color = Color::Red;

Expand Down Expand Up @@ -68,7 +67,6 @@ impl Anno {
Anno::Ctor => CTOR.spec(),
Anno::Dtor => DTOR.spec(),
Anno::Type => TYPE.spec(),
Anno::Identifier => IDENTIFIER.spec(),
Anno::Comment => COMMENT.spec(),
Anno::Backslash => KEYWORD.spec(),
Anno::BraceOpen => Default::default(),
Expand Down
5 changes: 0 additions & 5 deletions lang/printer/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pub trait ThemeExt<'a> {
fn ctor(&'a self, text: &str) -> Builder<'a>;
fn dtor(&'a self, text: &str) -> Builder<'a>;
fn typ(&'a self, text: &str) -> Builder<'a>;
fn identifier(&'a self, text: &str) -> Builder<'a>;
fn comment(&'a self, text: &str) -> Builder<'a>;
}

Expand All @@ -28,10 +27,6 @@ impl<'a> ThemeExt<'a> for Alloc<'a> {
self.text(text.to_owned()).annotate(Anno::Type)
}

fn identifier(&'a self, text: &str) -> Builder<'a> {
self.text(text.to_owned()).annotate(Anno::Identifier)
}

fn comment(&'a self, text: &str) -> Builder<'a> {
self.text(text.to_owned()).annotate(Anno::Comment)
}
Expand Down
1 change: 0 additions & 1 deletion lang/printer/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pub enum Anno {
Ctor,
Dtor,
Type,
Identifier,
Comment,
Backslash,
BraceOpen,
Expand Down
2 changes: 1 addition & 1 deletion lang/printer/src/ust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl<'a> Print<'a> for Let {
let head = alloc
.keyword(LET)
.append(alloc.space())
.append(alloc.identifier(name))
.append(name)
.append(params.print(cfg, alloc))
.append(print_return_type(cfg, alloc, typ))
.group();
Expand Down

0 comments on commit 032a6ad

Please sign in to comment.