diff options
Diffstat (limited to 'src/Verismith.hs')
-rw-r--r-- | src/Verismith.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Verismith.hs b/src/Verismith.hs index 4fb52ac..c329678 100644 --- a/src/Verismith.hs +++ b/src/Verismith.hs @@ -71,6 +71,8 @@ import Verismith.Tool import Verismith.Tool.Internal import Verismith.Utils (generateByteString) import Verismith.Verilog +import Verismith.Verilog +import Verismith.Verilog.Distance import Verismith.Verilog.Parser (parseSourceInfoFile) import Prelude hiding (FilePath) @@ -236,6 +238,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 |