mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-29 06:22:51 -06:00
Now the compiler maintains more precise information for the source locations of the different definitions. There is a --tags option which generates a list of all identifiers with their source locations.
This commit is contained in:
@@ -41,9 +41,12 @@ getSourceModule opts file0 = ioe $
|
||||
let location = file++":"++show l++":"++show c
|
||||
return (Bad (location++": "++msg))
|
||||
Right mo -> do removeTemp tmp
|
||||
return (Ok (addOptionsToModule opts mo))
|
||||
return (Ok (addOptionsToModule opts (setSrcPath file0 mo)))
|
||||
`catch` (return . Bad . show)
|
||||
|
||||
setSrcPath :: FilePath -> SourceModule -> SourceModule
|
||||
setSrcPath fpath = mapSourceModule (\m -> m{msrc=fpath})
|
||||
|
||||
addOptionsToModule :: Options -> SourceModule -> SourceModule
|
||||
addOptionsToModule opts = mapSourceModule (\m -> m { flags = flags m `addOptions` opts })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user