Current section
Files
Jump to
Current section
Files
src/prova.erl
-module(prova).
-compile([no_auto_import, nowarn_unused_vars]).
-export([main/0]).
-spec main() -> nil.
main() ->
File_name = <<"prova.prequel"/utf8>>,
_assert_subject = simplifile:read(File_name),
{ok, Source_code} = case _assert_subject of
{ok, _} -> _assert_subject;
_assert_fail ->
erlang:error(#{gleam_error => let_assert,
message => <<"Assertion pattern match failed"/utf8>>,
value => _assert_fail,
module => <<"prova"/utf8>>,
function => <<"main"/utf8>>,
line => 11})
end,
_pipe = prequel:parse(Source_code),
_pipe@1 = gleam@result:map(_pipe, fun prequel@pretty_printer:format/1),
_pipe@2 = gleam@result:map_error(
_pipe@1,
fun(_capture) ->
prequel@error@pipeline_error:format(
_capture,
File_name,
Source_code
)
end
),
_pipe@3 = gleam@result:unwrap_both(_pipe@2),
_pipe@4 = gleam@string_builder:to_string(_pipe@3),
gleam@io:println(_pipe@4).