mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32: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:
@@ -55,12 +55,11 @@ importSource src0 opts files = do
|
||||
-- for different cf formats
|
||||
importCF opts files get = do
|
||||
s <- fmap unlines $ mapM readFile files
|
||||
let cnc = justModuleName (last files)
|
||||
gf <- case get cnc s of
|
||||
Ok g -> return g
|
||||
gf <- case get (last files) s of
|
||||
Ok gf -> return gf
|
||||
Bad s -> error s ----
|
||||
Ok gr <- appIOE $ compileSourceGrammar opts gf
|
||||
epgf <- appIOE $ link opts (identC (BS.pack (cnc ++ "Abs"))) gr
|
||||
epgf <- appIOE $ link opts (identC (BS.pack (justModuleName (last files) ++ "Abs"))) gr
|
||||
case epgf of
|
||||
Ok pgf -> return pgf
|
||||
Bad s -> error s ----
|
||||
Bad s -> error s ----
|
||||
|
||||
Reference in New Issue
Block a user