diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2019-02-14 06:49:29 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-03-16 16:46:17 +0100 |
commit | f6e38d7ac97aaeb77a97e3dc0af047c89a7e4402 (patch) | |
tree | 655319c0a35aa1dbabe531437670f7505230bcd1 /src/local.mk | |
parent | 855fbf1c1150b985b450e24338e23e48cd2bf2df (diff) | |
download | bison-f6e38d7ac97aaeb77a97e3dc0af047c89a7e4402.tar.gz |
diagnostics: use libtextstyle for colored output
Bruno Haible released libtextstyle, a library for colored output based
on CSS. Let's use it to generate colored diagnostics, provided
libtextstyle is available.
See
https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00176.html
https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00073.html
https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00084.html
https://lists.gnu.org/archive/html/bison-patches/2019-03/msg00007.html
* bootstrap.conf (gnulib_modules): Use libtextstyle when possible.
* data/diagnostics.css: New.
* src/complain.c (begin_use_class, end_use_class, flush)
(severity_style, complain_init_color): New.
Use them.
* src/getargs.c (getargs_colors): New.
(getargs): Use it.
Skip --color and --style.
* src/location.h, src/location.c (location_print): Use a style.
* tests/bison.in: Force --color=yes when stderr is a tty.
* tests/local.at: Disable colors during the test suite.
* tests/input.at: Adjust expectations to the extra options passed on
the command line.
Diffstat (limited to 'src/local.mk')
-rw-r--r-- | src/local.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/local.mk b/src/local.mk index 4b0a0ff5..ee8ec03b 100644 --- a/src/local.mk +++ b/src/local.mk @@ -126,6 +126,7 @@ src_bison_LDADD = \ $(LIBTHREAD) \ $(LIB_CLOCK_GETTIME) \ $(LIB_GETHRXTIME) \ + $(LIBTEXTSTYLE) \ lib/libbison.a |