Skip to content

Commit

Permalink
Add bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Christakis committed Feb 11, 2011
1 parent 938a888 commit 237e0f2
Show file tree
Hide file tree
Showing 6 changed files with 1,542 additions and 0 deletions.
2 changes: 2 additions & 0 deletions general/MoreBugs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Recursive opaque
* Opaque 'true'
19 changes: 19 additions & 0 deletions general/rebar_opaque.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-module(rebar_opaque).
-export([consult/1]).

consult(Str) when is_list(Str) ->
consult([], Str, []).

consult(Cont, Str, Acc) ->
case erl_scan:tokens(Cont, Str, 0) of
{done, Result, Remaining} ->
case Result of
{ok, Tokens, _} ->
{ok, Term} = erl_parse:parse_term(Tokens),
consult([], Remaining, [Term | Acc]);
{eof, _Other} ->
lists:reverse(Acc)
end;
{more, Cont1} ->
consult(Cont1, eof, Acc)
end.
Loading

0 comments on commit 237e0f2

Please sign in to comment.