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

#410 in Rust patterns

Download history 1201/week @ 2024-02-15 559/week @ 2024-02-22 570/week @ 2024-02-29 672/week @ 2024-03-07 343/week @ 2024-03-14 408/week @ 2024-03-21 485/week @ 2024-03-28 885/week @ 2024-04-04 1117/week @ 2024-04-11 1047/week @ 2024-04-18 1089/week @ 2024-04-25 1714/week @ 2024-05-02 1292/week @ 2024-05-09 1499/week @ 2024-05-16 1525/week @ 2024-05-23 1332/week @ 2024-05-30

5,957 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
~41K SLoC