forked from GitHub/gf-core
Do string sharing after unescaping in source and canonical grammars.
This commit is contained in:
@@ -131,7 +131,7 @@ alexInputPrevChar (p, c, s) = c
|
|||||||
|
|
||||||
alex_action_1 = tok (\p s -> PT p (TS $ shareString s))
|
alex_action_1 = tok (\p s -> PT p (TS $ shareString s))
|
||||||
alex_action_2 = tok (\p s -> PT p (eitherResIdent (TV . shareString) s))
|
alex_action_2 = tok (\p s -> PT p (eitherResIdent (TV . shareString) s))
|
||||||
alex_action_3 = tok (\p s -> PT p (TL $ unescapeInitTail $ shareString s))
|
alex_action_3 = tok (\p s -> PT p (TL $ shareString $ unescapeInitTail s))
|
||||||
alex_action_4 = tok (\p s -> PT p (TI s))
|
alex_action_4 = tok (\p s -> PT p (TI s))
|
||||||
{-# LINE 1 "GenericTemplate.hs" #-}
|
{-# LINE 1 "GenericTemplate.hs" #-}
|
||||||
{-# LINE 1 "<built-in>" #-}
|
{-# LINE 1 "<built-in>" #-}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ $white+ ;
|
|||||||
@rsyms { tok (\p s -> PT p (TS $ shareString s)) }
|
@rsyms { tok (\p s -> PT p (TS $ shareString s)) }
|
||||||
|
|
||||||
$l $i* { tok (\p s -> PT p (eitherResIdent (TV . shareString) s)) } -- H
|
$l $i* { tok (\p s -> PT p (eitherResIdent (TV . shareString) s)) } -- H
|
||||||
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \"{ tok (\p s -> PT p (TL $ unescapeInitTail $ shareString s)) } -- H
|
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \"{ tok (\p s -> PT p (TL $ shareString $ unescapeInitTail s)) } -- H
|
||||||
|
|
||||||
$d+ { tok (\p s -> PT p (TI s)) }
|
$d+ { tok (\p s -> PT p (TI s)) }
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ alexInputPrevChar (p, c, s) = c
|
|||||||
alex_action_3 = tok (\p s -> PT p (TS $ shareString s))
|
alex_action_3 = tok (\p s -> PT p (TS $ shareString s))
|
||||||
alex_action_4 = tok (\p s -> PT p (eitherResIdent (T_LString . shareString) s))
|
alex_action_4 = tok (\p s -> PT p (eitherResIdent (T_LString . shareString) s))
|
||||||
alex_action_5 = tok (\p s -> PT p (eitherResIdent (TV . shareString) s))
|
alex_action_5 = tok (\p s -> PT p (eitherResIdent (TV . shareString) s))
|
||||||
alex_action_6 = tok (\p s -> PT p (TL $ unescapeInitTail $ shareString s))
|
alex_action_6 = tok (\p s -> PT p (TL $ shareString $ unescapeInitTail s))
|
||||||
alex_action_7 = tok (\p s -> PT p (TI s))
|
alex_action_7 = tok (\p s -> PT p (TI s))
|
||||||
{-# LINE 1 "GenericTemplate.hs" #-}
|
{-# LINE 1 "GenericTemplate.hs" #-}
|
||||||
{-# LINE 1 "<built-in>" #-}
|
{-# LINE 1 "<built-in>" #-}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ $white+ ;
|
|||||||
\' ($u # \')* \' { tok (\p s -> PT p (eitherResIdent (T_LString . shareString) s)) } -- H
|
\' ($u # \')* \' { tok (\p s -> PT p (eitherResIdent (T_LString . shareString) s)) } -- H
|
||||||
|
|
||||||
$l $i* { tok (\p s -> PT p (eitherResIdent (TV . shareString) s)) } -- H
|
$l $i* { tok (\p s -> PT p (eitherResIdent (TV . shareString) s)) } -- H
|
||||||
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \"{ tok (\p s -> PT p (TL $ unescapeInitTail $ shareString s)) } -- H
|
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \"{ tok (\p s -> PT p (TL $ shareString $ unescapeInitTail s)) } -- H
|
||||||
|
|
||||||
$d+ { tok (\p s -> PT p (TI s)) }
|
$d+ { tok (\p s -> PT p (TI s)) }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user