Skip to content

Commit

Permalink
Merge pull request #10 from spawngrid/nil-record-default
Browse files Browse the repository at this point in the history
Prevent seresye_engine rule addition from choking on {nil, Line} default...
  • Loading branch information
ericbmerritt committed Feb 1, 2012
2 parents af019ca + d2e0f22 commit 80bde8b
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 80bde8b

Please sign in to comment.