Packages

Erlang code generator for Idris 2

Current section

Files

Jump to
idris2 src Idris.Idris2.Idris.IDEMode.Parser.erl
Raw

src/Idris.Idris2.Idris.IDEMode.Parser.erl

-module('Idris.Idris2.Idris.IDEMode.Parser').
-compile('no_auto_import').
-compile('inline').
-compile({'inline_size',24}).
-export([
'case--idelex-365'/2,
'case--idelex,notComment-346'/3,
'nested--3420-341--in--un--notComment'/2,
'un--symbols'/0,
'un--sexp'/0,
'un--parseSExp'/1,
'un--idelex'/1,
'un--ideTokens'/0,
'un--ideParser'/4
]).
'case--idelex-365'(V0, V1) -> case V1 of {'Idris.Builtin.MkPair', E0, E1} -> (fun (V2, V3) -> case V3 of {'Idris.Builtin.MkPair', E2, E3} -> (fun (V4, V5) -> case V5 of {'Idris.Builtin.MkPair', E4, E5} -> (fun (V6, V7) -> case V7 of <<""/utf8>> -> {'Idris.Prelude.Types.Right', ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', ('Idris.Idris2.Data.List':'un--filter'('erased', fun (V8) -> ('nested--3420-341--in--un--notComment'(V0, V8)) end, V2)), [{'Idris.Text.Bounded.MkBounded', {'Idris.Parser.Lexer.Source.EndInput'}, 1, V4, V6, V4, V6} | []]))}; _ -> {'Idris.Prelude.Types.Left', V3} end end(E4, E5)); _ -> {'Idris.Prelude.Types.Left', V3} end end(E2, E3)); _ -> {'Idris.Prelude.Types.Left', V3} end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--idelex,notComment-346'(V0, V1, V2) -> case V2 of {'Idris.Parser.Lexer.Source.Comment', E0} -> (fun (V3) -> 1 end(E0)); _ -> 0 end.
'nested--3420-341--in--un--notComment'(V0, V1) -> ('case--idelex,notComment-346'(V0, V1, case V1 of {'Idris.Text.Bounded.MkBounded', E0, E1, E2, E3, E4, E5} -> (fun (V2, V3, V4, V5, V6, V7) -> V2 end(E0, E1, E2, E3, E4, E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end)).
'un--symbols'() -> [<<"("/utf8>> | [<<":"/utf8>> | [<<")"/utf8>> | []]]].
'un--sexp'() -> {'Idris.Text.Parser.Core.Alt', ('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)), ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)), fun () -> ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 1 end)), fun () -> ('Idris.Idris2.Prelude.Basics':'un--&&'(0, fun () -> ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)), fun () -> ('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)) end)) end)) end)) end)), {'Idris.Text.Parser.Core.SeqEat', 0, ('Idris.Idris2.Parser.Rule.Source':'un--symbol'(<<":"/utf8>>)), fun () -> fun (V0) -> {'Idris.Text.Parser.Core.SeqEat', 1, ('Idris.Idris2.Parser.Rule.Source':'un--exactIdent'(<<"True"/utf8>>)), fun () -> fun (V1) -> {'Idris.Text.Parser.Core.Empty', {'Idris.Idris.IDEMode.Commands.BoolAtom', 0}} end end} end end}, fun () -> {'Idris.Text.Parser.Core.Alt', ('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)), ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 1 end)), fun () -> ('Idris.Idris2.Prelude.Basics':'un--&&'(0, fun () -> ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)), fun () -> ('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)) end)) end)) end)), {'Idris.Text.Parser.Core.SeqEat', 0, ('Idris.Idris2.Parser.Rule.Source':'un--symbol'(<<":"/utf8>>)), fun () -> fun (V2) -> {'Idris.Text.Parser.Core.SeqEat', 1, ('Idris.Idris2.Parser.Rule.Source':'un--exactIdent'(<<"False"/utf8>>)), fun () -> fun (V3) -> {'Idris.Text.Parser.Core.Empty', {'Idris.Idris.IDEMode.Commands.BoolAtom', 1}} end end} end end}, fun () -> {'Idris.Text.Parser.Core.Alt', ('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 1 end)), ('Idris.Idris2.Prelude.Basics':'un--&&'(0, fun () -> ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)), fun () -> ('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)) end)) end)), {'Idris.Text.Parser.Core.SeqEat', 1, ('Idris.Idris2.Parser.Rule.Source':'un--intLit'()), fun () -> fun (V4) -> {'Idris.Text.Parser.Core.Empty', {'Idris.Idris.IDEMode.Commands.IntegerAtom', V4}} end end}, fun () -> {'Idris.Text.Parser.Core.Alt', 0, ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)), fun () -> ('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)) end)), {'Idris.Text.Parser.Core.SeqEat', 1, ('Idris.Idris2.Parser.Rule.Source':'un--strLit'()), fun () -> fun (V5) -> {'Idris.Text.Parser.Core.Empty', {'Idris.Idris.IDEMode.Commands.StringAtom', V5}} end end}, fun () -> {'Idris.Text.Parser.Core.Alt', ('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)), ('Idris.Idris2.Prelude.Basics':'un--||'(0, fun () -> 0 end)), {'Idris.Text.Parser.Core.SeqEat', 0, ('Idris.Idris2.Parser.Rule.Source':'un--symbol'(<<":"/utf8>>)), fun () -> fun (V6) -> {'Idris.Text.Parser.Core.SeqEat', 1, ('Idris.Idris2.Parser.Rule.Source':'un--unqualifiedName'()), fun () -> fun (V7) -> {'Idris.Text.Parser.Core.Empty', {'Idris.Idris.IDEMode.Commands.SymbolAtom', V7}} end end} end end}, fun () -> {'Idris.Text.Parser.Core.SeqEat', 0, ('Idris.Idris2.Parser.Rule.Source':'un--symbol'(<<"("/utf8>>)), fun () -> fun (V8) -> {'Idris.Text.Parser.Core.SeqEmpty', 1, 0, ('Idris.Idris2.Text.Parser':'un--many'('erased', 'erased', ('un--sexp'()))), fun (V9) -> {'Idris.Text.Parser.Core.SeqEat', 1, ('Idris.Idris2.Parser.Rule.Source':'un--symbol'(<<")"/utf8>>)), fun () -> fun (V10) -> {'Idris.Text.Parser.Core.Empty', {'Idris.Idris.IDEMode.Commands.SExpList', V9}} end end} end} end end} end} end} end} end} end}.
'un--parseSExp'(V0) -> ('un--ideParser'('erased', 0, V0, {'Idris.Text.Parser.Core.SeqEat', 1, ('un--sexp'()), fun () -> fun (V1) -> {'Idris.Text.Parser.Core.SeqEmpty', 1, 1, ('Idris.Idris2.Parser.Rule.Source':'un--eoi'()), fun (V2) -> {'Idris.Text.Parser.Core.Empty', V1} end} end end})).
'un--idelex'(V0) -> ('case--idelex-365'(V0, ('Idris.Idris2.Text.Lexer.Core':'un--lex'('erased', ('un--ideTokens'()), V0)))).
'un--ideTokens'() -> ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V0) -> {'Idris.Builtin.MkPair', ('Idris.Idris2.Text.Lexer':'un--exact'(V0)), fun (V1) -> {'Idris.Parser.Lexer.Source.Symbol', V1} end} end, ('un--symbols'()))), [{'Idris.Builtin.MkPair', ('Idris.Idris2.Text.Lexer':'un--digits'()), fun (V2) -> {'Idris.Parser.Lexer.Source.IntegerLit', ('Idris.Idris2.Prelude.Types':'dn--un--cast_Cast__String_Integer'(V2))} end} | [{'Idris.Builtin.MkPair', ('Idris.Idris2.Text.Lexer':'un--stringLit'()), fun (V3) -> {'Idris.Parser.Lexer.Source.StringLit', ('Idris.Idris2.Data.Maybe':'un--fromMaybe'('erased', fun () -> <<""/utf8>> end, ('Idris.Idris2.Parser.Support':'un--escape'(('Idris.Idris2.Utils.String':'un--stripQuotes'(V3))))))} end} | [{'Idris.Builtin.MkPair', ('Idris.Idris2.Parser.Lexer.Common':'un--identAllowDashes'()), fun (V4) -> {'Idris.Parser.Lexer.Source.Ident', V4} end} | [{'Idris.Builtin.MkPair', ('Idris.Idris2.Text.Lexer':'un--space'()), fun (V5) -> {'Idris.Parser.Lexer.Source.Comment', V5} end} | []]]]])).
'un--ideParser'(V0, V1, V2, V3) -> ('Idris.Idris2.Prelude.Types':'dn--un-->>=_Monad__(Either $e)'('erased', 'erased', 'erased', ('Idris.Idris2.Utils.Either':'un--mapError'('erased', 'erased', 'erased', fun (V4) -> {'Idris.Parser.Support.LexFail', V4} end, ('un--idelex'(V2)))), fun (V5) -> ('Idris.Idris2.Prelude.Types':'dn--un-->>=_Monad__(Either $e)'('erased', 'erased', 'erased', ('Idris.Idris2.Utils.Either':'un--mapError'('erased', 'erased', 'erased', fun (V6) -> ('Idris.Idris2.Parser.Support':'un--toGenericParsingError'('erased', V6)) end, ('Idris.Idris2.Text.Parser.Core':'un--parse'('erased', 'erased', V1, V3, V5)))), fun (V7) -> {'Idris.Prelude.Types.Right', ('Idris.Idris2.Builtin':'un--fst'('erased', 'erased', V7))} end)) end)).