Skip to content

Commit ebdc91b

Browse files
committed
Polished Pretty
With pretty-printing pretty much completely working, I moved the bulk of the functions into an internal module, then from 'Language.Rust.Pretty' itself, I only expose the typeclasses 'Pretty' and 'PrettyAnnotated', and a bunch of instances. Ideally, this is going to be enough for most users - the functionality is exposed, and the Haddock will be short. Also internally cleaned up some stray functions in Pretty (block-like things are now named accordingly and mostly unified).
1 parent a2d125b commit ebdc91b

File tree

5 files changed

+1000
-973
lines changed

5 files changed

+1000
-973
lines changed

language-rust.cabal

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ library
2121
default-language: Haskell2010
2222

2323
exposed-modules: Language.Rust.Pretty
24+
Language.Rust.Pretty.Internal
2425
Language.Rust.Syntax.Token
2526
Language.Rust.Syntax.Ident
2627
Language.Rust.Syntax.Constants

src/Language/Rust/Parser/Parser2.y

+2
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@ generic_values_after_lt
480480
| comma(lifetime) { (sequence $1, pure [] , pure [] ) }
481481
| { (pure [] , pure [] , pure [] ) }
482482
483+
484+
483485
-- parse_arg_general(false) -- does not require name
484486
-- NOT ALL PATTERNS ARE ACCEPTED: <https://github.com/rust-lang/rust/issues/35203>
485487
arg_general :: { Spanned (Arg Span) }

0 commit comments

Comments
 (0)