Skip to content

Commit

Permalink
replace @ and split assignment with subarray
Browse files Browse the repository at this point in the history
  • Loading branch information
xhliu committed Jul 1, 2019
1 parent 684fc5d commit e714c44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docs/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ Signature Verification

bytes Operations
----------------
* ``bytes data[start:end]``

Returns subarray from index ``start`` inclusive to ``end`` exclusive.

* ``bytes num2bin(int num, int size)``

Converts a number ``num`` into a bytes array of size ``size``.
Expand Down
6 changes: 1 addition & 5 deletions docs/syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Formal Specification
constructor &::= \mathrm{constructor}([formal[,\ formal]^*])\ \{\ [stmt]^*\ \}\\
external &::= \mathrm{function}\ \mathrm{ID}(formal[,\ formal]^*)\ \mathrm{external}\ \{\ [stmt]^*\ \mathrm{require}(expr);\}\\
stmt &::= \mathrm{TYPE}\ \mathrm{ID} = expr;\\
&\ \ \ |\ \ \mathrm{TYPE}\ (\mathrm{ID},\ \mathrm{ID}) = expr;\\
&\ \ \ |\ \ \mathrm{ID} = expr;\\
&\ \ \ |\ \ \mathrm{require}(expr);\\
&\ \ \ |\ \ \mathrm{if}\ (expr)\ stmt\ [\mathrm{else}\ stmt]\\
Expand All @@ -23,6 +22,7 @@ Formal Specification
expr &::= \mathsf{UnaryOp}\ expr\\
&\ \ \ |\ \ expr\ \mathsf{BinaryOp}\ expr\\
&\ \ \ |\ \ \mathrm{ID}(expr[,\ expr]^*)\\
&\ \ \ |\ \ \mathrm{ID}\mathbf{[}expr:expr\mathbf{]}\\
&\ \ \ |\ \ (expr)\\
&\ \ \ |\ \ \mathrm{ID}\\
&\ \ \ |\ \ boolConst \\
Expand Down Expand Up @@ -145,10 +145,6 @@ Operators
* - 11
- ``||``
- left-associative

* - 12
- ``@``
- non-associative
..
explain ===,!==,.,@ meaning, and note &&,|| evaluates both sides regardless
Expand Down

0 comments on commit e714c44

Please sign in to comment.