diff options
author | Gabriel Riba Faura <griba2001@gmail.com> | 2015-06-03 08:34:23 +0200 |
---|---|---|
committer | Gabriel Riba Faura <griba2001@gmail.com> | 2015-06-03 08:34:23 +0200 |
commit | f97ff31913211b5cd34278782285e920788583f9 (patch) | |
tree | e8f2de102e2aa9ecedd07538a874b4660bbe6e26 | |
parent | b609954bf0065f5acbc50dbfa7e28e7145f9a2e3 (diff) |
location literal _LOC_
-rw-r--r-- | src/urweb.lex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/urweb.lex b/src/urweb.lex index c44a4c1d..eada3611 100644 --- a/src/urweb.lex +++ b/src/urweb.lex @@ -537,6 +537,12 @@ xint = x[0-9a-fA-F][0-9a-fA-F]; <INITIAL> "CURRENT_TIMESTAMP" => (Tokens.CURRENT_TIMESTAMP (pos yypos, pos yypos + size yytext)); +<INITIAL> "_LOC_" => (let val strLoc = ErrorMsg.spanToString (ErrorMsg.spanOf + (pos yypos, pos yypos + size yytext)) + in + Tokens.STRING (strLoc, pos yypos, pos yypos + size yytext) + end); + <INITIAL> {id} => (Tokens.SYMBOL (yytext, pos yypos, pos yypos + size yytext)); <INITIAL> {cid} => (Tokens.CSYMBOL (yytext, pos yypos, pos yypos + size yytext)); |