Skip to content

Commit

Permalink
Prevent seresye_engine rule addition from choking on {nil, Line} defa…
Browse files Browse the repository at this point in the history
…ult values in records
  • Loading branch information
yrashk committed Feb 1, 2012
1 parent 0e45f26 commit d2e0f22
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/seresye_engine.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit d2e0f22

Please sign in to comment.