Removed all records from the core decoder. Replaced with macros and a raw tuple containing options. Updated one test to account for changed api.

This commit is contained in:
alisdair sullivan 2010-05-27 12:56:21 -07:00
parent 6d90c49be3
commit 2a2275136a
4 changed files with 43 additions and 35 deletions

View file

@ -21,11 +21,11 @@
%% THE SOFTWARE.
-record(opts, {
comments = false,
escaped_unicode = ascii,
encoding = utf8
}).
%% option flags
-define(comments_true(X), {true, _} = X).
-define(escaped_unicode_to_ascii(X), {_, ascii} = X).
-define(escaped_unicode_to_codepoint(X), {_, codepoint} = X).
%% whitespace
-define(space, 16#20).