mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: support for -color/-nocolor option overrides
This commit is contained in:
@@ -30,7 +30,7 @@ pub const (
|
||||
)
|
||||
|
||||
pub struct EManager {
|
||||
pub mut:
|
||||
mut:
|
||||
support_color bool
|
||||
}
|
||||
|
||||
@@ -40,6 +40,10 @@ pub fn new_error_manager() &EManager {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn (e &EManager) set_support_color(b bool) {
|
||||
e.support_color = b
|
||||
}
|
||||
|
||||
fn bold(msg string) string {
|
||||
if !emanager.support_color {
|
||||
return msg
|
||||
|
||||
Reference in New Issue
Block a user