6 releases

0.1.2 Apr 9, 2024
0.1.1 Apr 9, 2024
0.1.0 Sep 15, 2022
0.0.2 Oct 25, 2022
0.0.1 Sep 19, 2022

#425 in Rust patterns

Download history 369/week @ 2024-01-22 704/week @ 2024-01-29 437/week @ 2024-02-05 492/week @ 2024-02-12 1046/week @ 2024-02-19 511/week @ 2024-02-26 669/week @ 2024-03-04 569/week @ 2024-03-11 310/week @ 2024-03-18 464/week @ 2024-03-25 461/week @ 2024-04-01 1219/week @ 2024-04-08 963/week @ 2024-04-15 1396/week @ 2024-04-22 646/week @ 2024-04-29 1688/week @ 2024-05-06

4,728 downloads per month
Used in 3 crates (via compiler_base_error)

Apache-2.0 OR MIT

22KB
426 lines

reuse rustc_errors for compiler_base.

note: [WIP] Do not use it.


lib.rs:

Text rendering and related helper functions.

Reuse 'styled_buffer.rs' in 'rustc_errors', and 'styled_buffer.rs' has been modified to fit the feature of 'Compiler-Base'.

  • add method appendl() and pushs() to StyledBuffer.

  • replaced the enum Style with generics T: Clone + PartialEq + Eq + Style to support extending more styles. StyledBuffer still should be valid when facing the user-defined style, rather than just supporting a built-in enum Style.

  • add some test cases for 'StyledBuffer'.

Dependencies

~0–7.5MB
~43K SLoC