feat: more debruijn stuff

This commit is contained in:
rvcas
2022-06-03 22:00:16 -04:00
parent f8edb5d519
commit 946937f945
5 changed files with 118 additions and 42 deletions

View File

@@ -1,4 +1,7 @@
use uplc::parser;
use uplc::{
ast::{NamedDeBruijn, Program},
parser,
};
use neptune::Cli;
@@ -13,13 +16,17 @@ fn main() -> anyhow::Result<()> {
let flat_bytes = program.to_flat()?;
print!("flat bits: ");
for byte in flat_bytes {
print!("{:08b} ", byte);
}
println!();
println!("{}", program.flat_hex()?);
let program: Program<NamedDeBruijn> = program.try_into().unwrap();
println!("{:#?}", program);
Ok(())
}