Skip to content

Commit 2278b17

Browse files
Minor changes -- more comments, removed some debugging lines
1 parent dcbef30 commit 2278b17

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/ir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ pub enum BoxedExpr {
223223
}
224224

225225
impl BoxedExpr {
226+
// starting character of the expression
226227
pub fn start(&self) -> usize {
227228
match self {
228229
BoxedExpr::Const(_, start, _) => *start,
@@ -233,6 +234,7 @@ impl BoxedExpr {
233234
}
234235
}
235236

237+
// ending character of the expression
236238
pub fn end(&self) -> usize {
237239
match self {
238240
BoxedExpr::Const(_, _, end) => *end,
@@ -244,8 +246,6 @@ impl BoxedExpr {
244246
}
245247
}
246248

247-
// add further bin ops
248-
249249
#[derive(Clone, Copy, Hash, PartialEq, Eq, Default)]
250250
pub struct StructId(u32);
251251
entity_impl!(StructId, "struct");

src/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ fn parse_expr(pairs: Pairs<Rule>, tr: &mut Transaction, st: &mut SymbolTable, fi
204204
let expr_id = boxed_expr_to_expr_id(boxed_expr, tr, st, fileid);
205205

206206
// print out expr loc for testing
207-
println!("Expr: {:?}, Expr loc: {:?}", serialize_expr(tr, st, &expr_id), tr.get_expr_loc(expr_id));
207+
// println!("Expr: {:?}, Expr loc: {:?}", serialize_expr(tr, st, &expr_id), tr.get_expr_loc(expr_id));
208208

209209
expr_id
210210
}
@@ -453,7 +453,7 @@ mod tests {
453453
use super::*;
454454

455455
fn test_re_serialize(tr: Transaction, st : SymbolTable, filename: &str) {
456-
println!("Transaction {:?}: {:?}", tr.name, tr);
456+
// println!("Transaction {:?}: {:?}", tr.name, tr);
457457
println!("============= {} =============", filename);
458458

459459
// Serialize into a string first, and then use println macro;

tests/add_struct.prot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ fn add<DUT: Adder>(in a: u32, in b: u32, out s: u32) {
1414
DUT.b := X;
1515
s := DUT.s;
1616
DUT.s := a;
17-
// assert_eq(s, DUT.s);
17+
assert_eq(s, DUT.s);
1818
}

tests/aes128.prot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ fn aes128<dut : TinyAES128>(in key: u128, in state: u128, out output: u128) {
1414
dut.state := X;
1515
dut.key := X;
1616
// twenty cycles to complete
17-
// step(20);
17+
// step(20); (commented until we modify the IR to allow for expresisons in Step stmts)
1818
assert_eq(dut.output, output);
1919
}

0 commit comments

Comments
 (0)