Wait for theme
new
Umwelt (context) > Parser
Parser
Extracts metadata from AST
concepts
Aliases ()
Parses @attr AST
Attrs ()
Parses @attr AST
Def ()
Parses Function AST
Defmodule ()
Parses Module AST
Defp ()
Parses Function AST
Defstruct ()
Parses Struct definition AST
Literal ()
Parses value AST
Macro ()
Parses various AST
Operator ()
Parses Operator AST:
Pipe ()
Parses Pipe AST
Root ()
Parses Root Module AST
Sigil ()
Parses Sigil AST
Structure ()
Parses %Structure{} and <<>> AST
Tuple ()
Parses Tuple AST
Typespec ()
Parses Typespec definition AST
attrs
fields
signatures
⨌ read_ast / 1 (anything) Signature inference is ambiguous, choose stricter type
Head of read_ast/1
⨌ parse_source / 1 (anything) Signature inference is ambiguous, choose stricter type
Head of parse_source/1
⨌ parse_root / 1 (anything) Signature inference is ambiguous, choose stricter type
Head of parse_root/1
⨌ parse_raw / 1 (anything) Signature inference is ambiguous, choose stricter type
Head of parse_raw/1
⨌ parse_ast / 1 (anything) Signature inference is ambiguous, choose stricter type
Head of parse_ast/1
⨌ parse_list / 2 (anything) Signature inference is ambiguous, choose stricter type
Head of parse_list/2
⨌ parse / 2 (anything) Signature inference is ambiguous, choose stricter type
Head of parse/2
⨌ maybe_list_parse / 2 (anything) Signature inference is ambiguous, choose stricter type
Head of maybe_list_parse/2
samples
lib/umwelt/parser.ex
defmodule Umwelt.Parser do
@moduledoc "Extracts metadata from AST"
@doc "Head of maybe_list_parse/2"
@spec maybe_list_parse(ast :: any, aliases :: any) :: any
def maybe_list_parse(ast, aliases)
@doc "maybe_list_parse when is_list"
def maybe_list_parse(ast, aliases) when is_list(ast) do
end
def maybe_list_parse(ast, aliases) do
end
@doc "Head of parse/2"
@spec parse(ast :: any, _aliases :: any) :: any
def parse(ast, _aliases)
@doc "parse when is_macro"
def parse(ast, aliases) when is_macro(ast) do
end
def parse(ast, _aliases) do
end
@doc "parse when is_list"
def parse(ast, aliases) when is_list(ast) do
end
def parse(ast, _aliases) do
end
@doc "Head of parse_ast/1"
@spec parse_ast(tuple :: tuple) :: any
def parse_ast(tuple)
def parse_ast(tuple) do
end
@doc "Head of parse_list/2"
@spec parse_list(ast :: any, aliases :: any) :: any
def parse_list(ast, aliases)
@doc "parse_list when is_list"
def parse_list(ast, aliases) when is_list(ast) do
end
@doc "Head of parse_raw/1"
@spec parse_raw(code :: any) :: any
def parse_raw(code)
def parse_raw(code) do
end
@doc "Head of parse_root/1"
@spec parse_root(tuple :: tuple) :: any
def parse_root(tuple)
def parse_root(tuple) do
end
@doc "Head of parse_source/1"
@spec parse_source(project :: any) :: any
def parse_source(project)
def parse_source(project) do
end
@doc "Head of read_ast/1"
@spec read_ast(code :: any) :: any
def read_ast(code)
def read_ast(code) do
end
def read_ast(code) do
end
@doc "read_ast when is_binary"
def read_ast(code) when is_binary(code) do
end
end
defmodule Umwelt.Parser do
@moduledoc "Extracts metadata from AST"
@doc "Head of maybe_list_parse/2"
@spec maybe_list_parse(ast :: any, aliases :: any) :: any
def maybe_list_parse(ast, aliases)
@doc "maybe_list_parse when is_list"
def maybe_list_parse(ast, aliases) when is_list(ast) do
end
def maybe_list_parse(ast, aliases) do
end
@doc "Head of parse/2"
@spec parse(ast :: any, _aliases :: any) :: any
def parse(ast, _aliases)
@doc "parse when is_macro"
def parse(ast, aliases) when is_macro(ast) do
end
def parse(ast, _aliases) do
end
@doc "parse when is_list"
def parse(ast, aliases) when is_list(ast) do
end
def parse(ast, _aliases) do
end
@doc "Head of parse_ast/1"
@spec parse_ast(tuple :: tuple) :: any
def parse_ast(tuple)
def parse_ast(tuple) do
end
@doc "Head of parse_list/2"
@spec parse_list(ast :: any, aliases :: any) :: any
def parse_list(ast, aliases)
@doc "parse_list when is_list"
def parse_list(ast, aliases) when is_list(ast) do
end
@doc "Head of parse_raw/1"
@spec parse_raw(code :: any) :: any
def parse_raw(code)
def parse_raw(code) do
end
@doc "Head of parse_root/1"
@spec parse_root(tuple :: tuple) :: any
def parse_root(tuple)
def parse_root(tuple) do
end
@doc "Head of parse_source/1"
@spec parse_source(project :: any) :: any
def parse_source(project)
def parse_source(project) do
end
@doc "Head of read_ast/1"
@spec read_ast(code :: any) :: any
def read_ast(code)
def read_ast(code) do
end
def read_ast(code) do
end
@doc "read_ast when is_binary"
def read_ast(code) when is_binary(code) do
end
end
test/umwelt/parser_test.exs
defmodule Umwelt.ParserTest do
use ExUnit.Case, async: true
alias Umwelt.Parser
describe("maybe_list_parse / 2") do
test "fun maybe_list_parse" do
end
end
describe("parse / 2") do
test "fun parse" do
end
test "fun parse" do
end
end
describe("parse_ast / 1") do
test "fun parse_ast" do
end
end
describe("parse_list / 2") do
end
describe("parse_raw / 1") do
test "fun parse_raw" do
end
end
describe("parse_root / 1") do
test "fun parse_root" do
end
end
describe("parse_source / 1") do
test "fun parse_source" do
end
end
describe("read_ast / 1") do
test "fun read_ast" do
end
test "fun read_ast" do
end
end
end
defmodule Umwelt.ParserTest do
use ExUnit.Case, async: true
alias Umwelt.Parser
describe("maybe_list_parse / 2") do
test "fun maybe_list_parse" do
end
end
describe("parse / 2") do
test "fun parse" do
end
test "fun parse" do
end
end
describe("parse_ast / 1") do
test "fun parse_ast" do
end
end
describe("parse_list / 2") do
end
describe("parse_raw / 1") do
test "fun parse_raw" do
end
end
describe("parse_root / 1") do
test "fun parse_root" do
end
end
describe("parse_source / 1") do
test "fun parse_source" do
end
end
describe("read_ast / 1") do
test "fun read_ast" do
end
test "fun read_ast" do
end
end
end