From d2e0f225427c30fbcae101143750294524730971 Mon Sep 17 00:00:00 2001 From: Yurii Rashkovskii Date: Wed, 1 Feb 2012 11:16:01 -0800 Subject: [PATCH] Prevent seresye_engine rule addition from choking on {nil, Line} default values in records --- src/seresye_engine.erl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/seresye_engine.erl b/src/seresye_engine.erl index a061c84..4877957 100644 --- a/src/seresye_engine.erl +++ b/src/seresye_engine.erl @@ -249,6 +249,12 @@ get_records([_ | Tail], Acc) -> get_records(Tail, Acc). get_record_fields([], Acc) -> lists:reverse(Acc); +get_record_fields([{record_field, _, + {atom, _, FieldName}, {nil, _}} + | Tail], + Acc) -> + NewAcc = [{FieldName, {nil, []}} | Acc], + get_record_fields(Tail, NewAcc); get_record_fields([{record_field, _, {atom, _, FieldName}, {Type, _, DefaultValue}} | Tail],