Browse Source

Bugfix: Use "io_lib" instead of "io" library so we return a string instead of printing to stdout.

git-svn-id: http://erlydtl.googlecode.com/svn/trunk@108 a5195066-8e3e-0410-a82a-05b01b1b9875
emmiller 17 years ago
parent
commit
8881081668
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/erlydtl/erlydtl_scanner.erl

+ 3 - 3
src/erlydtl/erlydtl_scanner.erl

@@ -175,7 +175,7 @@ scan([H | T], Scanned, {Row, Column}, {in_code, Closer}) ->
         digit ->
             scan(T, [{number_literal, {Row, Column}, [H]} | Scanned], {Row, Column + 1}, {in_number, Closer});
         _ ->
-            {error, io:format("Illegal character line ~p column ~p", [Row, Column])}
+            {error, io_lib:format("Illegal character line ~p column ~p", [Row, Column])}
     end;
 
 scan([H | T], Scanned, {Row, Column}, {in_number, Closer}) ->
@@ -183,7 +183,7 @@ scan([H | T], Scanned, {Row, Column}, {in_number, Closer}) ->
         digit ->
             scan(T, append_char(Scanned, H), {Row, Column + 1}, {in_number, Closer});
         _ ->
-            {error, io:format("Illegal character line ~p column ~p", [Row, Column])}
+            {error, io_lib:format("Illegal character line ~p column ~p", [Row, Column])}
     end;
 
 scan([H | T], Scanned, {Row, Column}, {in_identifier, Closer}) ->
@@ -193,7 +193,7 @@ scan([H | T], Scanned, {Row, Column}, {in_identifier, Closer}) ->
         digit ->
             scan(T, append_char(Scanned, H), {Row, Column + 1}, {in_identifier, Closer});
         _ ->
-            {error, io:format("Illegal character line ~p column ~p", [Row, Column])}
+            {error, io_lib:format("Illegal character line ~p column ~p", [Row, Column])}
     end.
 
 % internal functions