mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-09-19 08:46:02 -06:00
finnish the patterns in the case statement
This commit is contained in:
@@ -257,8 +257,10 @@ parse_ :: PGF -> Language -> Type -> Maybe Int -> String -> (ParseOutput [Expr],
|
|||||||
parse_ gr (CId lang) cat dp sent =
|
parse_ gr (CId lang) cat dp sent =
|
||||||
case Map.lookup lang (PGF2.languages gr) of
|
case Map.lookup lang (PGF2.languages gr) of
|
||||||
Just cnc -> case (PGF2.parse cnc cat sent,dp) of
|
Just cnc -> case (PGF2.parse cnc cat sent,dp) of
|
||||||
(ParseOk ts, Just n) -> (ParseOk (map fst (take n ts)),noBS)
|
(ParseOk ts, Just n) -> (ParseOk (map fst (take n ts)),noBS)
|
||||||
--(res, ) -> res
|
(ParseOk ts, Nothing) -> (ParseOk (map fst ts),noBS)
|
||||||
|
(ParseFailed pos,_ ) -> (ParseFailed pos,noBS)
|
||||||
|
(ParseIncomplete,_ ) -> (ParseIncomplete,noBS)
|
||||||
Nothing -> error ("Unknown language: " ++ lang)
|
Nothing -> error ("Unknown language: " ++ lang)
|
||||||
|
|
||||||
complete :: PGF -> Language -> Type -> String -> String -> (BracketedString,String,Map.Map Token [CId])
|
complete :: PGF -> Language -> Type -> String -> String -> (BracketedString,String,Map.Map Token [CId])
|
||||||
|
|||||||
Reference in New Issue
Block a user