lean4-htt/src/Lean
Leonardo de Moura 0717c3d0b2 chore: adding helper parser completion
I am hitting many error recovery problems. This is an attempt to make
auto-completion more robust.
For example, we currently can't auto complete inside of parentheses.
The syntax tree for the syntactically incorrect tern `(s. , 0)` is
```
(Term.paren "(" [(Term.proj `s ".")])
```
The elaborator for `paren` fails to match this partial syntax tree and
returns an error. I considered adding code to the `else` branch of
this elaborator and handle partial trees there. However, we would
still be losing information for the other elements of the tuple.
Example: no hover information for them.
The helper parser makes sure we don't lose information.
2021-04-05 18:44:01 -07:00
..
Compiler chore: remove when and «unless» 2021-03-20 18:52:18 -07:00
Data feat: missing forM 2021-04-03 18:24:31 -07:00
Elab feat: add helper functions for syntax match 2021-04-05 18:38:57 -07:00
Meta feat: use expected type to prioritize completion candidates 2021-04-03 14:12:42 -07:00
Parser chore: adding helper parser completion 2021-04-05 18:44:01 -07:00
ParserCompiler chore: throwError! => throwError, throwErrorAt! => throwErrorAt 2021-03-11 11:59:45 -08:00
PrettyPrinter chore: helpers for parser debugging 2021-04-05 10:00:47 +02:00
Server chore: remove completion auxiliary parser 2021-04-05 11:26:13 -07:00
Util fix: use pp.raw options when falling back to raw parser 2021-04-01 16:42:04 +02:00
Attributes.lean chore: convert keywords to snake_case 2021-03-12 13:34:51 -08:00
AuxRecursor.lean chore: improve error message 2021-01-17 07:51:08 -08:00
Class.lean refactor: remove Monad Option and Alternative Option 2021-03-20 18:25:25 -07:00
Compiler.lean chore: remove #lang lean4 header 2020-10-25 09:54:07 -07:00
CoreM.lean chore: throwError! => throwError, throwErrorAt! => throwErrorAt 2021-03-11 11:59:45 -08:00
Data.lean feat: trie for hierarchical names 2020-12-03 16:40:00 -08:00
Declaration.lean chore: helper methods 2021-03-27 18:48:03 -07:00
DeclarationRange.lean fix: UTF-16 strikes again 2021-01-19 13:22:13 -08:00
DocString.lean feat: store declaration ranges 2021-01-11 12:50:11 -08:00
Elab.lean feat: add dummy elabForIn 2021-02-05 17:02:57 -08:00
Environment.lean refactor: pos at time_task::time_task was a dead field 2021-01-30 11:10:18 -08:00
Eval.lean chore: update structure, class, inductive 2020-11-27 15:09:30 -08:00
Exception.lean chore: throwError! => throwError, throwErrorAt! => throwErrorAt 2021-03-11 11:59:45 -08:00
Expr.lean feat: CoeSort Bool Prop 2021-03-20 14:52:16 +01:00
HeadIndex.lean chore: use deriving BEq 2020-12-22 18:10:20 -08:00
Hygiene.lean feat: improve universe level pretty printer 2020-12-21 07:34:48 -08:00
InternalExceptionId.lean chore: use deriving BEq 2020-12-22 18:10:20 -08:00
KeyedDeclsAttribute.lean fix: KeyedDeclsAttribute: preserve scopedness 2021-03-13 13:18:04 +01:00
Level.lean refactor: remove Monad Option and Alternative Option 2021-03-20 18:25:25 -07:00
LocalContext.lean chore: spaces 2021-03-27 14:07:45 -07:00
Message.lean feat: add MessageData.instantiateMVars 2021-03-05 19:07:08 -08:00
Meta.lean refactor: move collectFVars to Meta 2021-03-26 19:16:21 -07:00
MetavarContext.lean chore: cleanup, fix docs 2021-03-07 09:01:54 -08:00
Modifiers.lean chore: naming convention 2020-11-11 10:08:55 -08:00
MonadEnv.lean feat: mkConstWithLevelParams 2021-03-20 08:28:18 -07:00
Parser.lean chore: implement lhs prec 2021-03-22 16:33:37 +01:00
ParserCompiler.lean chore: implement lhs prec 2021-03-22 16:33:37 +01:00
PrettyPrinter.lean refactor: move & split Lean.Delaborator 2020-11-30 13:52:46 +01:00
ProjFns.lean refactor: add MapDeclarationExtension 2021-01-10 18:25:56 -08:00
ReducibilityAttrs.lean fix: unfold class projections when using TransparencyMode.instances 2021-01-25 12:30:26 -08:00
ResolveName.lean feat: activate auto completion 2021-04-03 21:01:17 -07:00
Runtime.lean chore: cleanup 2020-10-28 09:33:19 -07:00
ScopedEnvExtension.lean fix: missing pushScope and popScope 2021-03-16 16:42:45 -07:00
Server.lean refactor: add Server/Completion.lean 2021-04-02 11:10:06 -07:00
Structure.lean fix: From/ToJson derive handlers with inheritance 2021-01-28 15:07:26 +01:00
Syntax.lean feat: add helper functions for syntax match 2021-04-05 18:38:57 -07:00
ToExpr.lean chore: use double quote 2021-01-20 17:07:01 -08:00
Util.lean fix: missing occursCheck at SyntheticMVars 2021-01-29 17:13:04 -08:00