diff options
Diffstat (limited to 'src/Verismith.hs')
-rw-r--r-- | src/Verismith.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Verismith.hs b/src/Verismith.hs index c9d3e78..9dc3475 100644 --- a/src/Verismith.hs +++ b/src/Verismith.hs @@ -70,6 +70,7 @@ import Verismith.Tool import Verismith.Tool.Internal import Verismith.Verilog import Verismith.Verilog.Parser (parseSourceInfoFile) +import Verismith.Verilog.Distance import Verismith.Utils (generateByteString) toFP :: String -> FilePath @@ -216,6 +217,11 @@ handleOpts (ConfigOpt c conf r) = do $ T.unpack . toTextIgnore <$> c +handleOpts (DistanceOpt v1 v2) = do + src1 <- parseSourceInfoFile (T.pack v1) (toTextIgnore v1) + src2 <- parseSourceInfoFile (T.pack v2) (toTextIgnore v2) + let d = distance src1 src2 + putStrLn ("Distance: " <> show d) defaultMain :: IO () defaultMain = do |