mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
the indirections in the .gf-tags files now point directly to the origin of the corresponding indentifiers
This commit is contained in:
@@ -62,17 +62,22 @@ getImports opts gr mo@(m,mi) = concatMap toDep allOpens
|
|||||||
|
|
||||||
toDep (OSimple m,incl) =
|
toDep (OSimple m,incl) =
|
||||||
let Ok mi = lookupModule gr m
|
let Ok mi = lookupModule gr m
|
||||||
in [showIdent id ++ "\t" ++ "indir" ++ "\t" ++ showIdent m ++ "\t\t" ++ gf2gftags opts (msrc mi)
|
in [showIdent id ++ "\t" ++ "indir" ++ "\t" ++ showIdent m ++ "\t\t" ++ gf2gftags opts (orig mi info)
|
||||||
| id <- Map.keys (jments mi), filter incl id]
|
| (id,info) <- Map.toList (jments mi), filter incl id]
|
||||||
toDep (OQualif m1 m2,incl) =
|
toDep (OQualif m1 m2,incl) =
|
||||||
let Ok mi = lookupModule gr m2
|
let Ok mi = lookupModule gr m2
|
||||||
in [showIdent id ++ "\t" ++ "indir" ++ "\t" ++ showIdent m2 ++ "\t" ++ showIdent m1 ++ "\t" ++ gf2gftags opts (msrc mi)
|
in [showIdent id ++ "\t" ++ "indir" ++ "\t" ++ showIdent m2 ++ "\t" ++ showIdent m1 ++ "\t" ++ gf2gftags opts (orig mi info)
|
||||||
| id <- Map.keys (jments mi), filter incl id]
|
| (id,info) <- Map.toList (jments mi), filter incl id]
|
||||||
|
|
||||||
filter MIAll id = True
|
filter MIAll id = True
|
||||||
filter (MIOnly ids) id = elem id ids
|
filter (MIOnly ids) id = elem id ids
|
||||||
filter (MIExcept ids) id = not (elem id ids)
|
filter (MIExcept ids) id = not (elem id ids)
|
||||||
|
|
||||||
|
orig mi info =
|
||||||
|
case info of
|
||||||
|
AnyInd _ m0 -> let Ok mi0 = lookupModule gr m0
|
||||||
|
in msrc mi0
|
||||||
|
_ -> msrc mi
|
||||||
|
|
||||||
gftagsFile :: FilePath -> FilePath
|
gftagsFile :: FilePath -> FilePath
|
||||||
gftagsFile f = addExtension f "gf-tags"
|
gftagsFile f = addExtension f "gf-tags"
|
||||||
|
|||||||
Reference in New Issue
Block a user