mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
Change the type of PGF.Lexing.bindTok to [String] -> [String]
The old type was [String] -> String. This function was only used in GF.Text.Lexing.stringOp, which now uses (unwords . bindTok) instead, with no change in behaviour.
This commit is contained in:
@@ -14,7 +14,7 @@ stringOp name = case name of
|
|||||||
"lexcode" -> Just $ appLexer lexCode
|
"lexcode" -> Just $ appLexer lexCode
|
||||||
"lexmixed" -> Just $ appLexer lexMixed
|
"lexmixed" -> Just $ appLexer lexMixed
|
||||||
"words" -> Just $ appLexer words
|
"words" -> Just $ appLexer words
|
||||||
"bind" -> Just $ appUnlexer bindTok
|
"bind" -> Just $ appUnlexer (unwords . bindTok)
|
||||||
"unchars" -> Just $ appUnlexer concat
|
"unchars" -> Just $ appUnlexer concat
|
||||||
"unlextext" -> Just $ appUnlexer (unlexText . unquote)
|
"unlextext" -> Just $ appUnlexer (unlexText . unquote)
|
||||||
"unlexcode" -> Just $ appUnlexer unlexCode
|
"unlexcode" -> Just $ appUnlexer unlexCode
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ unlexText = capitInit . unlext where
|
|||||||
_ -> []
|
_ -> []
|
||||||
|
|
||||||
-- | Bind tokens separated by Prelude.BIND, i.e. &+
|
-- | Bind tokens separated by Prelude.BIND, i.e. &+
|
||||||
bindTok :: [String] -> String
|
bindTok :: [String] -> [String]
|
||||||
bindTok ws = case ws of
|
bindTok ws = case ws of
|
||||||
w:"&+":ws2 -> w ++ bindTok ws2
|
w1:"&+":w2:ws -> bindTok ((w1++w2):ws)
|
||||||
w:[] -> w
|
"&+":ws -> bindTok ws
|
||||||
w:ws2 -> w ++ " " ++ bindTok ws2
|
w:ws -> w:bindTok ws
|
||||||
[] -> ""
|
[] -> []
|
||||||
|
|
||||||
-- * Code lexing
|
-- * Code lexing
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user