3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-19 04:13:39 +00:00

allow attributes in front of ++/-- statements

This commit is contained in:
Zachary Snow 2023-09-18 23:26:35 -04:00
parent 4edb1a1921
commit 7d07615dee
2 changed files with 15 additions and 15 deletions

View file

@ -13,21 +13,21 @@ module top;
// post-increment/decrement statements
x++;
check(1, 0, 0);
y (* foo *) ++;
(* bar *) y (* foo *) ++;
check(1, 1, 0);
z--;
check(1, 1, -1);
z (* foo *) --;
(* bar *) z (* foo *) --;
check(1, 1, -2);
// pre-increment/decrement statements are equivalent
++z;
check(1, 1, -1);
++ (* foo *) z;
(* bar *) ++ (* foo *) z;
check(1, 1, 0);
--x;
check(0, 1, 0);
-- (* foo *) y;
(* bar *) -- (* foo *) y;
check(0, 0, 0);
// procedural pre-increment/decrement expressions