Merge pull request #365 from GreasySlug/feature/color

Color changes due to features flag and use debug colors defined as constants
This commit is contained in:
Slug 2023-01-26 14:56:32 +09:00 committed by GitHub
commit dde998480b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 53 additions and 64 deletions

View file

@ -2,6 +2,7 @@
use std::option::Option; // conflicting to Type::Option
use erg_common::error::{Location, MultiErrorDisplay};
use erg_common::style::colors::DEBUG_ERROR;
use crate::ty::constructors::{and, not, or, poly};
use crate::ty::free::{Constraint, FreeKind};
@ -131,7 +132,7 @@ impl Context {
|| self.nominal_supertype_of(lhs, rhs)
}
};
log!("answer: {lhs} {RED}:>{RESET} {rhs} == {res}");
log!("answer: {lhs} {DEBUG_ERROR}:>{RESET} {rhs} == {res}");
res
}

View file

@ -4,6 +4,7 @@ use erg_common::config::ErgConfig;
use erg_common::dict::Dict;
use erg_common::error::Location;
use erg_common::set::Set;
use erg_common::style::colors::DEBUG_MAIN;
use erg_common::traits::{Locational, Stream};
use erg_common::vis::Visibility;
use erg_common::Str;
@ -78,7 +79,7 @@ impl OwnershipChecker {
self.check_expr(chunk, Ownership::Owned, true);
}
log!(
"{GREEN}[DEBUG] the ownership checking process has completed, found errors: {}{RESET}",
"{DEBUG_MAIN}[DEBUG] the ownership checking process has completed, found errors: {}{RESET}",
self.errs.len()
);
if self.errs.is_empty() {