mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
fix parsing with HOAS
This commit is contained in:
@@ -33,6 +33,7 @@ import qualified Data.IntMap as IntMap
|
|||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import PGF.Utilities (nub')
|
import PGF.Utilities (nub')
|
||||||
|
import qualified Data.ByteString.UTF8 as UTF8
|
||||||
|
|
||||||
data Forest
|
data Forest
|
||||||
= Forest
|
= Forest
|
||||||
@@ -103,11 +104,11 @@ bracketedTokn dp f@(Forest abs cnc forest root) =
|
|||||||
descend (PCoerce fid) = trustedSpots parents' (PArg [] fid)
|
descend (PCoerce fid) = trustedSpots parents' (PArg [] fid)
|
||||||
descend (PConst c e _) = IntSet.empty
|
descend (PConst c e _) = IntSet.empty
|
||||||
|
|
||||||
isLindefCId id
|
isLindefCId id@(CId utf8)
|
||||||
| take l s == lindef = Just (mkCId (drop l s))
|
| take l s == lindef = Just (mkCId (drop l s))
|
||||||
| otherwise = Nothing
|
| otherwise = Nothing
|
||||||
where
|
where
|
||||||
s = showCId id
|
s = UTF8.toString utf8
|
||||||
lindef = "lindef "
|
lindef = "lindef "
|
||||||
l = length lindef
|
l = length lindef
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user