Support generating signed numbers.

This commit is contained in:
2020-01-14 12:13:40 -10:00
parent 4383b67c44
commit e46cfe56d1
15 changed files with 218 additions and 30 deletions

View File

@@ -29,7 +29,7 @@ declareModOps :: Word -> [Word] -> SourceFile Span
declareModOps bitsize _ =
let sname = mkIdent ("U" ++ show bitsize)
bname = mkIdent ("U" ++ show (bitsize * 2))
testFileLit = Lit [] (Str (testFile bitsize) Cooked Unsuffixed mempty) mempty
testFileLit = Lit [] (Str (testFile True bitsize) Cooked Unsuffixed mempty) mempty
in [sourceFile|
use core::convert::TryFrom;
use crate::unsigned::{$$sname, $$bname};