changeset 2150:763ccca119bc

location literal _LOC_
author Gabriel Riba Faura <griba2001@gmail.com>
date Wed, 03 Jun 2015 08:34:23 +0200 (2015-06-03)
parents 854d7ba67a59
children 4cd36865e0b5
files src/urweb.lex
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/urweb.lex	Thu May 28 10:28:15 2015 -0400
+++ b/src/urweb.lex	Wed Jun 03 08:34:23 2015 +0200
@@ -537,6 +537,12 @@
 
 <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));