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

#439 in Rust patterns

Download history 509/week @ 2024-04-02 1408/week @ 2024-04-09 957/week @ 2024-04-16 1235/week @ 2024-04-23 972/week @ 2024-04-30 1483/week @ 2024-05-07 1537/week @ 2024-05-14 1757/week @ 2024-05-21 1586/week @ 2024-05-28 456/week @ 2024-06-04 591/week @ 2024-06-11 569/week @ 2024-06-18 1131/week @ 2024-06-25 1059/week @ 2024-07-02 1286/week @ 2024-07-09 855/week @ 2024-07-16

4,387 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