Skip to content

Commit

Permalink
boolean and/or
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightguth committed Aug 26, 2024
1 parent d0de1dc commit 00363a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/expression.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ module SOLIDITY-EXPRESSION
rule v(true, bool) ? X : _ => X
rule v(false, bool) ? _ : X => X
// boolean and/or
rule v(true, bool) && E => E
rule v(false, bool) && _ => v(false, bool)
rule v(true, bool) || _ => v(true, bool)
rule v(false, bool) || E => E
// helpers
syntax Int ::= Number2Int(NumberLiteral) [function]
rule Number2Int(X:HexNumber) => HexNumberString2Int(HexNumber2String(X))
Expand Down

0 comments on commit 00363a4

Please sign in to comment.