Remove the quotes from scanned string
This commit is contained in:
parent
96c0fab3ab
commit
a670d1ca6c
@ -51,8 +51,11 @@ FUNCTION : {token, {function, TokenLine, 'FUNCTION' }}.
|
|||||||
{token, {int, TokenLine, parse_int(TokenChars)}}.
|
{token, {int, TokenLine, parse_int(TokenChars)}}.
|
||||||
-{INT} :
|
-{INT} :
|
||||||
{token, {int, TokenLine, parse_int(TokenChars)}}.
|
{token, {int, TokenLine, parse_int(TokenChars)}}.
|
||||||
|
|
||||||
|
%% Due to the definition of STRING the tokens start and end with a quote ".
|
||||||
{STRING} :
|
{STRING} :
|
||||||
{token, {string, TokenLine, unicode:characters_to_binary(TokenChars)}}.
|
{token, {string, TokenLine, unicode:characters_to_binary(
|
||||||
|
lists:sublist(TokenChars, 2, length(TokenChars) - 2))}}.
|
||||||
{BITS} :
|
{BITS} :
|
||||||
{token, {bits, TokenLine, bits(TokenChars)}}.
|
{token, {bits, TokenLine, bits(TokenChars)}}.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user