0 | ||| Slightly different lexer than the source language because we are more free
 1 | ||| as to what can be identifiers, and fewer tokens are supported. But otherwise,
 2 | ||| we can reuse the standard stuff
 3 | module Idris.IDEMode.Parser
 4 |
 5 | import Core.Core
 6 | import Core.FC
 7 |
 8 | import Protocol.SExp
 9 | import Protocol.SExp.Parser
10 |
11 | import Parser.Source
12 |
13 | Cast SExpError Error where
14 |   cast (LexError    err) = fromLexError                   (Virtual Interactive) err
15 |   cast (ParseErrors err) = fromParsingErrors {ann = Void} (Virtual Interactive) err
16 |
17 | export
18 | covering
19 | parseSExp : String -> Either Error SExp
20 | parseSExp inp
21 |     = mapFst cast $ Protocol.SExp.Parser.parseSExp inp
22 |