Leonardo de Moura
7013ea4098
feat: add interpolatedStr to ParserDescr and Syntax
2020-10-09 14:04:53 -07:00
Leonardo de Moura
36696d726d
feat: add String Interpolation
2020-10-09 13:40:35 -07:00
Sebastian Ullrich
f0dad079ad
fix: checkWsBefore.formatter
2020-10-07 10:01:17 +02:00
Sebastian Ullrich
69fe4c7338
fix: formatter: must backtrack on symbols as well
2020-10-07 09:46:47 +02:00
Sebastian Ullrich
21f1a66ceb
feat: add & use ppDedent parser combinator
2020-10-07 09:46:47 +02:00
Sebastian Ullrich
b1e35d6ca9
fix: ppGroup
2020-10-07 09:44:05 +02:00
Sebastian Ullrich
e777478aa1
fix: Formatter.pushLine
2020-10-07 09:44:05 +02:00
Sebastian Ullrich
5d76a981b0
chore: adjust pp spacing
2020-10-07 09:44:04 +02:00
Leonardo de Moura
5c74c408ae
chore: remove nodeSepBy1Unbox combinator
2020-10-06 08:28:40 -07:00
Leonardo de Moura
9a551d9219
feat: add withForbidden and withoutForbidden parser combinators
2020-10-05 09:36:28 -07:00
Sebastian Ullrich
d51101b884
feat: sanitize Syntax in messages
...
Fixes #182
2020-09-29 07:59:22 -07:00
Leonardo de Moura
1fcdbaf223
feat: add withoutPosition combinator
2020-09-28 17:10:57 -07:00
Leonardo de Moura
6ddec22763
refactor: simplify withPosition combinator
...
Add `checkColGt`
2020-09-28 17:10:56 -07:00
Leonardo de Moura
453ce9b3b8
feat: add eoi parser
2020-09-27 16:54:19 -07:00
Leonardo de Moura
3d6cc2de08
feat: add notFollowedByCategoryToken parser
2020-09-26 15:53:23 -07:00
Leonardo de Moura
e31fd665f0
feat: add checkLineLe parser
2020-09-26 14:03:28 -07:00
Sebastian Ullrich
fa55c1e088
fix: pretty printing loose bvars
...
Fixes #192
2020-09-23 11:13:23 +02:00
Leonardo de Moura
f4b5ec710f
fix: fixes #175
2020-09-21 17:12:07 -07:00
Sebastian Ullrich
68568e78d3
feat: formatter: use hard space after opening structure instance brace
2020-09-18 13:15:40 -07:00
Sebastian Ullrich
519eda2459
feat: formatter: interpret checkWsBefore as soft space
2020-09-18 13:15:40 -07:00
Sebastian Ullrich
95007171a8
feat: formatter: group+indent binders and structure instance fields
2020-09-18 13:15:40 -07:00
Sebastian Ullrich
ec3682ce15
feat: formatter: automatically group+indent syntax categories
2020-09-18 13:15:40 -07:00
Sebastian Ullrich
ac6c2b7a8e
feat: formatter: interpret space after token as soft space
2020-09-18 13:15:40 -07:00
Leonardo de Moura
d1c3ab3797
feat: many1Unbox and nodeSepBy1Unbox parser combinators
...
@Kha I removed the dummy parenthesizer/formatter for `withResultOf`,
and add proper ones for `many1Unbox` and `nodeSepBy1Unbox`.
2020-09-17 13:17:46 -07:00
Leonardo de Moura
4265348bed
feat: add withResultOf parser combinator and unboxSingleton
2020-09-17 12:03:16 -07:00
Sebastian Ullrich
26ed304071
fix: pretty print simplified macro scopes
2020-09-17 17:13:50 +02:00
Sebastian Ullrich
98453c468b
feat: formatter: don't escape inaccessible names
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
9b6370bdbe
feat: formatter: escaping compound identifiers
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
fad4660135
feat: pretty print space between binders
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
02a6b4d126
chore: remove obsolete code
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
650e836ab3
fix: pp internal names
2020-09-17 08:12:28 -07:00
Leonardo de Moura
821b1c2b6c
chore: remove arity
...
@Kha I improved the arity calculation for `extern`s.
2020-08-31 16:38:39 -07:00
Leonardo de Moura
2563d03ae2
feat: add notFollowedBy
2020-08-31 15:37:41 -07:00
Leonardo de Moura
3a9cfeb9fb
fix: lookahead.formatter
2020-08-30 08:37:51 -07:00
Leonardo de Moura
5ffbada3df
feat: add Lean.MonadEnv, Lean.MonadError, and Lean.MonadOptions
...
This is the first set of polymorphic methods. I will add more later,
and keep reducing code duplication.
cc @Kha
2020-08-22 16:00:43 -07:00
Leonardo de Moura
003966a9e9
refactor: simpler monad stack for FormatterM and ParenthesizerM
...
Motivation: make sure the code base is more uniform and will simplify
other code reorgs we want to do.
cc @Kha
2020-08-22 13:30:20 -07:00
Leonardo de Moura
916b395d1b
chore: cleanup
2020-08-21 09:29:09 -07:00
Sebastian Ullrich
786d90ac80
refactor: move parenthesizer and formatter into CoreM
...
/cc @leodemoura
2020-08-21 14:23:58 +02:00
Sebastian Ullrich
7a44ba7bdd
fix: pretty printer knot arity
2020-08-21 10:27:43 +02:00
Leonardo de Moura
05a0e7f6d0
refactor: build all main monads on top of ECoreM
2020-08-20 18:36:04 -07:00
Sebastian Ullrich
ea266e48ab
feat: unicodeSymbol.formatter: prefer symbol used in syntax tree
2020-08-20 18:57:08 +02:00
Sebastian Ullrich
4f5d1cf369
chore: finish formatter refactoring
2020-08-20 15:47:43 +02:00
Sebastian Ullrich
aa452b795d
refactor: make formatter precompiled as well
2020-08-20 15:29:33 +02:00
Sebastian Ullrich
68b9a8e1d1
refactor: move parenthesizer compiler into separate file, generalize
2020-08-20 13:22:57 +02:00
Sebastian Ullrich
9fa6795a73
feat: add [combinatorFormatter] attribute
2020-08-20 11:21:01 +02:00
Sebastian Ullrich
1840b4b1ff
fix: pretty printer with new syntax
2020-08-19 09:56:23 -07:00
Leonardo de Moura
d85a41a4d7
chore: reduce number of dependencies
...
@Kha Please try to avoid importing `Lean.Meta`, it is huge, and any
change there was forcing a bunch of files to be recompiled since
`Parser.Extension` depends on `Parenthesizer`
2020-08-14 10:59:00 -07:00
Sebastian Ullrich
0df6445be6
fix: relax [builtinParenthesizer] check
2020-08-14 19:05:02 +02:00
Leonardo de Moura
d7add53229
feat: add MonadExceptCore
2020-08-13 09:19:26 -07:00
Leonardo de Moura
f934a86646
feat: add (ref : Syntax) to Meta.Exception.other
...
@Kha The Syntax is here just to provide possition information. The
goal is to improve error message location information in code such as `DepElim`.
2020-08-06 09:40:16 -07:00