diff --git a/src/org/elixir_lang/beam/decompiler/Unquoted.java b/src/org/elixir_lang/beam/decompiler/Unquoted.java index a01ced004..c678be1f5 100644 --- a/src/org/elixir_lang/beam/decompiler/Unquoted.java +++ b/src/org/elixir_lang/beam/decompiler/Unquoted.java @@ -26,6 +26,7 @@ public class Unquoted extends MacroNameArity { SPECIAL_FORM_NAME_SET.add("<<>>"); SPECIAL_FORM_NAME_SET.add("do"); SPECIAL_FORM_NAME_SET.add("fn"); + SPECIAL_FORM_NAME_SET.add("nil"); SPECIAL_FORM_NAME_SET.add("unquote"); SPECIAL_FORM_NAME_SET.add("unquote_splicing"); SPECIAL_FORM_NAME_SET.add("{}"); diff --git a/testData/org/elixir_lang/beam/decompiler/erl_syntax.beam b/testData/org/elixir_lang/beam/decompiler/erl_syntax.beam new file mode 100644 index 000000000..8742731fe Binary files /dev/null and b/testData/org/elixir_lang/beam/decompiler/erl_syntax.beam differ diff --git a/testData/org/elixir_lang/beam/decompiler/erl_syntax.ex b/testData/org/elixir_lang/beam/decompiler/erl_syntax.ex new file mode 100644 index 000000000..57e15ccd9 --- /dev/null +++ b/testData/org/elixir_lang/beam/decompiler/erl_syntax.ex @@ -0,0 +1,1121 @@ +# Source code recreated from a .beam file by IntelliJ Elixir +defmodule :erl_syntax do + + # Functions + + def abstract(p0) do + # body not decompiled + end + + def add_ann(p0, p1) do + # body not decompiled + end + + def add_postcomments(p0, p1) do + # body not decompiled + end + + def add_precomments(p0, p1) do + # body not decompiled + end + + def annotated_type(p0, p1) do + # body not decompiled + end + + def annotated_type_body(p0) do + # body not decompiled + end + + def annotated_type_name(p0) do + # body not decompiled + end + + def application(p0, p1) do + # body not decompiled + end + + def application(p0, p1, p2) do + # body not decompiled + end + + def application_arguments(p0) do + # body not decompiled + end + + def application_operator(p0) do + # body not decompiled + end + + def arity_qualifier(p0, p1) do + # body not decompiled + end + + def arity_qualifier_argument(p0) do + # body not decompiled + end + + def arity_qualifier_body(p0) do + # body not decompiled + end + + def atom(p0) do + # body not decompiled + end + + def atom_literal(p0) do + # body not decompiled + end + + def atom_literal(p0, p1) do + # body not decompiled + end + + def atom_name(p0) do + # body not decompiled + end + + def atom_value(p0) do + # body not decompiled + end + + def attribute(p0) do + # body not decompiled + end + + def attribute(p0, p1) do + # body not decompiled + end + + def attribute_arguments(p0) do + # body not decompiled + end + + def attribute_name(p0) do + # body not decompiled + end + + def binary(p0) do + # body not decompiled + end + + def binary_comp(p0, p1) do + # body not decompiled + end + + def binary_comp_body(p0) do + # body not decompiled + end + + def binary_comp_template(p0) do + # body not decompiled + end + + def binary_field(p0) do + # body not decompiled + end + + def binary_field(p0, p1) do + # body not decompiled + end + + def binary_field(p0, p1, p2) do + # body not decompiled + end + + def binary_field_body(p0) do + # body not decompiled + end + + def binary_field_size(p0) do + # body not decompiled + end + + def binary_field_types(p0) do + # body not decompiled + end + + def binary_fields(p0) do + # body not decompiled + end + + def binary_generator(p0, p1) do + # body not decompiled + end + + def binary_generator_body(p0) do + # body not decompiled + end + + def binary_generator_pattern(p0) do + # body not decompiled + end + + def bitstring_type(p0, p1) do + # body not decompiled + end + + def bitstring_type_m(p0) do + # body not decompiled + end + + def bitstring_type_n(p0) do + # body not decompiled + end + + def block_expr(p0) do + # body not decompiled + end + + def block_expr_body(p0) do + # body not decompiled + end + + def case_expr(p0, p1) do + # body not decompiled + end + + def case_expr_argument(p0) do + # body not decompiled + end + + def case_expr_clauses(p0) do + # body not decompiled + end + + def catch_expr(p0) do + # body not decompiled + end + + def catch_expr_body(p0) do + # body not decompiled + end + + def char(p0) do + # body not decompiled + end + + def char_literal(p0) do + # body not decompiled + end + + def char_literal(p0, p1) do + # body not decompiled + end + + def char_value(p0) do + # body not decompiled + end + + def class_qualifier(p0, p1) do + # body not decompiled + end + + def class_qualifier_argument(p0) do + # body not decompiled + end + + def class_qualifier_body(p0) do + # body not decompiled + end + + def clause(p0, p1) do + # body not decompiled + end + + def clause(p0, p1, p2) do + # body not decompiled + end + + def clause_body(p0) do + # body not decompiled + end + + def clause_guard(p0) do + # body not decompiled + end + + def clause_patterns(p0) do + # body not decompiled + end + + def comment(p0) do + # body not decompiled + end + + def comment(p0, p1) do + # body not decompiled + end + + def comment_padding(p0) do + # body not decompiled + end + + def comment_text(p0) do + # body not decompiled + end + + def compact_list(p0) do + # body not decompiled + end + + def concrete(p0) do + # body not decompiled + end + + def cond_expr(p0) do + # body not decompiled + end + + def cond_expr_clauses(p0) do + # body not decompiled + end + + def conjunction(p0) do + # body not decompiled + end + + def conjunction_body(p0) do + # body not decompiled + end + + def cons(p0, p1) do + # body not decompiled + end + + def constrained_function_type(p0, p1) do + # body not decompiled + end + + def constrained_function_type_argument(p0) do + # body not decompiled + end + + def constrained_function_type_body(p0) do + # body not decompiled + end + + def constraint(p0, p1) do + # body not decompiled + end + + def constraint_argument(p0) do + # body not decompiled + end + + def constraint_body(p0) do + # body not decompiled + end + + def copy_ann(p0, p1) do + # body not decompiled + end + + def copy_attrs(p0, p1) do + # body not decompiled + end + + def copy_comments(p0, p1) do + # body not decompiled + end + + def copy_pos(p0, p1) do + # body not decompiled + end + + def data(p0) do + # body not decompiled + end + + def disjunction(p0) do + # body not decompiled + end + + def disjunction_body(p0) do + # body not decompiled + end + + def eof_marker() do + # body not decompiled + end + + def error_marker(p0) do + # body not decompiled + end + + def error_marker_info(p0) do + # body not decompiled + end + + def flatten_form_list(p0) do + # body not decompiled + end + + def float(p0) do + # body not decompiled + end + + def float_literal(p0) do + # body not decompiled + end + + def float_value(p0) do + # body not decompiled + end + + def form_list(p0) do + # body not decompiled + end + + def form_list_elements(p0) do + # body not decompiled + end + + def fun_expr(p0) do + # body not decompiled + end + + def fun_expr_arity(p0) do + # body not decompiled + end + + def fun_expr_clauses(p0) do + # body not decompiled + end + + def fun_type() do + # body not decompiled + end + + def function(p0, p1) do + # body not decompiled + end + + def function_arity(p0) do + # body not decompiled + end + + def function_clauses(p0) do + # body not decompiled + end + + def function_name(p0) do + # body not decompiled + end + + def function_type(p0) do + # body not decompiled + end + + def function_type(p0, p1) do + # body not decompiled + end + + def function_type_arguments(p0) do + # body not decompiled + end + + def function_type_return(p0) do + # body not decompiled + end + + def generator(p0, p1) do + # body not decompiled + end + + def generator_body(p0) do + # body not decompiled + end + + def generator_pattern(p0) do + # body not decompiled + end + + def get_ann(p0) do + # body not decompiled + end + + def get_attrs(p0) do + # body not decompiled + end + + def get_pos(p0) do + # body not decompiled + end + + def get_postcomments(p0) do + # body not decompiled + end + + def get_precomments(p0) do + # body not decompiled + end + + def has_comments(p0) do + # body not decompiled + end + + def if_expr(p0) do + # body not decompiled + end + + def if_expr_clauses(p0) do + # body not decompiled + end + + def implicit_fun(p0) do + # body not decompiled + end + + def implicit_fun(p0, p1) do + # body not decompiled + end + + def implicit_fun(p0, p1, p2) do + # body not decompiled + end + + def implicit_fun_name(p0) do + # body not decompiled + end + + def infix_expr(p0, p1, p2) do + # body not decompiled + end + + def infix_expr_left(p0) do + # body not decompiled + end + + def infix_expr_operator(p0) do + # body not decompiled + end + + def infix_expr_right(p0) do + # body not decompiled + end + + def integer(p0) do + # body not decompiled + end + + def integer_literal(p0) do + # body not decompiled + end + + def integer_range_type(p0, p1) do + # body not decompiled + end + + def integer_range_type_high(p0) do + # body not decompiled + end + + def integer_range_type_low(p0) do + # body not decompiled + end + + def integer_value(p0) do + # body not decompiled + end + + def is_atom(p0, p1) do + # body not decompiled + end + + def is_char(p0, p1) do + # body not decompiled + end + + def is_form(p0) do + # body not decompiled + end + + def is_integer(p0, p1) do + # body not decompiled + end + + def is_leaf(p0) do + # body not decompiled + end + + def is_list_skeleton(p0) do + # body not decompiled + end + + def is_literal(p0) do + # body not decompiled + end + + def is_proper_list(p0) do + # body not decompiled + end + + def is_string(p0, p1) do + # body not decompiled + end + + def is_tree(p0) do + # body not decompiled + end + + def join_comments(p0, p1) do + # body not decompiled + end + + def list(p0) do + # body not decompiled + end + + def list(p0, p1) do + # body not decompiled + end + + def list_comp(p0, p1) do + # body not decompiled + end + + def list_comp_body(p0) do + # body not decompiled + end + + def list_comp_template(p0) do + # body not decompiled + end + + def list_elements(p0) do + # body not decompiled + end + + def list_head(p0) do + # body not decompiled + end + + def list_length(p0) do + # body not decompiled + end + + def list_prefix(p0) do + # body not decompiled + end + + def list_suffix(p0) do + # body not decompiled + end + + def list_tail(p0) do + # body not decompiled + end + + def macro(p0) do + # body not decompiled + end + + def macro(p0, p1) do + # body not decompiled + end + + def macro_arguments(p0) do + # body not decompiled + end + + def macro_name(p0) do + # body not decompiled + end + + def make_tree(p0, p1) do + # body not decompiled + end + + def map_expr(p0) do + # body not decompiled + end + + def map_expr(p0, p1) do + # body not decompiled + end + + def map_expr_argument(p0) do + # body not decompiled + end + + def map_expr_fields(p0) do + # body not decompiled + end + + def map_field_assoc(p0, p1) do + # body not decompiled + end + + def map_field_assoc_name(p0) do + # body not decompiled + end + + def map_field_assoc_value(p0) do + # body not decompiled + end + + def map_field_exact(p0, p1) do + # body not decompiled + end + + def map_field_exact_name(p0) do + # body not decompiled + end + + def map_field_exact_value(p0) do + # body not decompiled + end + + def map_type() do + # body not decompiled + end + + def map_type(p0) do + # body not decompiled + end + + def map_type_assoc(p0, p1) do + # body not decompiled + end + + def map_type_assoc_name(p0) do + # body not decompiled + end + + def map_type_assoc_value(p0) do + # body not decompiled + end + + def map_type_exact(p0, p1) do + # body not decompiled + end + + def map_type_exact_name(p0) do + # body not decompiled + end + + def map_type_exact_value(p0) do + # body not decompiled + end + + def map_type_fields(p0) do + # body not decompiled + end + + def match_expr(p0, p1) do + # body not decompiled + end + + def match_expr_body(p0) do + # body not decompiled + end + + def match_expr_pattern(p0) do + # body not decompiled + end + + def meta(p0) do + # body not decompiled + end + + def module_info() do + # body not decompiled + end + + def module_info(p0) do + # body not decompiled + end + + def module_qualifier(p0, p1) do + # body not decompiled + end + + def module_qualifier_argument(p0) do + # body not decompiled + end + + def module_qualifier_body(p0) do + # body not decompiled + end + + def named_fun_expr(p0, p1) do + # body not decompiled + end + + def named_fun_expr_arity(p0) do + # body not decompiled + end + + def named_fun_expr_clauses(p0) do + # body not decompiled + end + + def named_fun_expr_name(p0) do + # body not decompiled + end + + def unquote(:nil)() do + # body not decompiled + end + + def normalize_list(p0) do + # body not decompiled + end + + def operator(p0) do + # body not decompiled + end + + def operator_literal(p0) do + # body not decompiled + end + + def operator_name(p0) do + # body not decompiled + end + + def parentheses(p0) do + # body not decompiled + end + + def parentheses_body(p0) do + # body not decompiled + end + + def prefix_expr(p0, p1) do + # body not decompiled + end + + def prefix_expr_argument(p0) do + # body not decompiled + end + + def prefix_expr_operator(p0) do + # body not decompiled + end + + def receive_expr(p0) do + # body not decompiled + end + + def receive_expr(p0, p1, p2) do + # body not decompiled + end + + def receive_expr_action(p0) do + # body not decompiled + end + + def receive_expr_clauses(p0) do + # body not decompiled + end + + def receive_expr_timeout(p0) do + # body not decompiled + end + + def record_access(p0, p1, p2) do + # body not decompiled + end + + def record_access_argument(p0) do + # body not decompiled + end + + def record_access_field(p0) do + # body not decompiled + end + + def record_access_type(p0) do + # body not decompiled + end + + def record_expr(p0, p1) do + # body not decompiled + end + + def record_expr(p0, p1, p2) do + # body not decompiled + end + + def record_expr_argument(p0) do + # body not decompiled + end + + def record_expr_fields(p0) do + # body not decompiled + end + + def record_expr_type(p0) do + # body not decompiled + end + + def record_field(p0) do + # body not decompiled + end + + def record_field(p0, p1) do + # body not decompiled + end + + def record_field_name(p0) do + # body not decompiled + end + + def record_field_value(p0) do + # body not decompiled + end + + def record_index_expr(p0, p1) do + # body not decompiled + end + + def record_index_expr_field(p0) do + # body not decompiled + end + + def record_index_expr_type(p0) do + # body not decompiled + end + + def record_type(p0, p1) do + # body not decompiled + end + + def record_type_field(p0, p1) do + # body not decompiled + end + + def record_type_field_name(p0) do + # body not decompiled + end + + def record_type_field_type(p0) do + # body not decompiled + end + + def record_type_fields(p0) do + # body not decompiled + end + + def record_type_name(p0) do + # body not decompiled + end + + def remove_comments(p0) do + # body not decompiled + end + + def revert(p0) do + # body not decompiled + end + + def revert_forms(p0) do + # body not decompiled + end + + def set_ann(p0, p1) do + # body not decompiled + end + + def set_attrs(p0, p1) do + # body not decompiled + end + + def set_pos(p0, p1) do + # body not decompiled + end + + def set_postcomments(p0, p1) do + # body not decompiled + end + + def set_precomments(p0, p1) do + # body not decompiled + end + + def size_qualifier(p0, p1) do + # body not decompiled + end + + def size_qualifier_argument(p0) do + # body not decompiled + end + + def size_qualifier_body(p0) do + # body not decompiled + end + + def string(p0) do + # body not decompiled + end + + def string_literal(p0) do + # body not decompiled + end + + def string_literal(p0, p1) do + # body not decompiled + end + + def string_value(p0) do + # body not decompiled + end + + def subtrees(p0) do + # body not decompiled + end + + def text(p0) do + # body not decompiled + end + + def text_string(p0) do + # body not decompiled + end + + def tree(p0) do + # body not decompiled + end + + def tree(p0, p1) do + # body not decompiled + end + + def try_after_expr(p0, p1) do + # body not decompiled + end + + def try_expr(p0, p1) do + # body not decompiled + end + + def try_expr(p0, p1, p2) do + # body not decompiled + end + + def try_expr(p0, p1, p2, p3) do + # body not decompiled + end + + def try_expr_after(p0) do + # body not decompiled + end + + def try_expr_body(p0) do + # body not decompiled + end + + def try_expr_clauses(p0) do + # body not decompiled + end + + def try_expr_handlers(p0) do + # body not decompiled + end + + def tuple(p0) do + # body not decompiled + end + + def tuple_elements(p0) do + # body not decompiled + end + + def tuple_size(p0) do + # body not decompiled + end + + def tuple_type() do + # body not decompiled + end + + def tuple_type(p0) do + # body not decompiled + end + + def tuple_type_elements(p0) do + # body not decompiled + end + + def type(p0) do + # body not decompiled + end + + def type_application(p0, p1) do + # body not decompiled + end + + def type_application(p0, p1, p2) do + # body not decompiled + end + + def type_application_arguments(p0) do + # body not decompiled + end + + def type_application_name(p0) do + # body not decompiled + end + + def type_union(p0) do + # body not decompiled + end + + def type_union_types(p0) do + # body not decompiled + end + + def typed_record_field(p0, p1) do + # body not decompiled + end + + def typed_record_field_body(p0) do + # body not decompiled + end + + def typed_record_field_type(p0) do + # body not decompiled + end + + def underscore() do + # body not decompiled + end + + def update_tree(p0, p1) do + # body not decompiled + end + + def user_type_application(p0, p1) do + # body not decompiled + end + + def user_type_application_arguments(p0) do + # body not decompiled + end + + def user_type_application_name(p0) do + # body not decompiled + end + + def variable(p0) do + # body not decompiled + end + + def variable_literal(p0) do + # body not decompiled + end + + def variable_name(p0) do + # body not decompiled + end + + def warning_marker(p0) do + # body not decompiled + end + + def warning_marker_info(p0) do + # body not decompiled + end +end diff --git a/tests/org/elixir_lang/beam/DecompilerTest.java b/tests/org/elixir_lang/beam/DecompilerTest.java index a85c7fb06..cb28ddc61 100644 --- a/tests/org/elixir_lang/beam/DecompilerTest.java +++ b/tests/org/elixir_lang/beam/DecompilerTest.java @@ -133,6 +133,10 @@ public void testIssue833() throws IOException, OtpErlangDecodeException { assertDecompiled("docgen_xmerl_xml_cb"); } + public void testIssue859() throws IOException, OtpErlangDecodeException { + assertDecompiled("erl_syntax"); + } + public void testIssue860() throws IOException, OtpErlangDecodeException { assertDecompiled("OTP-PUB-KEY"); }