Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rognierbenoit committed Jun 6, 2022
1 parent 19f1973 commit 88edaeb
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/reference/assignments.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const assignments = {
],
fails: [
{
keyword: '"NatAssign"',
keyword: '"NAT_NEG_ASSIGN"',
desc: <div>when <code>a</code> (typed <code>nat</code>)is less than <code>b</code> (typed <code>nat</code>).</div>
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/declarations/entrypoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The body of the transaction is made of the following *sections*:

### `from`

The `from` section, followed by a state value, specifies the required state of the contract to transition from. It fails with `"InvalidState"` if the transition is called while the contract is in another state.
The `from` section, followed by a state value, specifies the required state of the contract to transition from. It fails with `"INVALID_STATE"` if the transition is called while the contract is in another state.

For example:
```archetype
Expand Down Expand Up @@ -361,7 +361,7 @@ If the effect section is the only section in entry point body, the `effect` keyw

```archetype
entry set_owner_candidate(oc : address) {
if caller = owner then fail("InvalidCaller");
if caller = owner then fail("INVALID_CALLER");
owner_candidate := some(oc)
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/expressions/operators/access.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const b = t[2]; /* 0xbc */

Accesses value associated with key `b` in [map](/docs/language-basics/container#map) `a` (also [`big_map`](/docs/reference/types#big_map<K,%20V>) and [`iterable_big_map`](/docs/reference/types#iterable_big_map<K,%20V>)).

It fails with `"NotFound"` if `b` is not found in `a`.
It fails with `"NOT_FOUND"` if `b` is not found in `a`.

For example:
```archetype
Expand Down
1 change: 1 addition & 0 deletions docs/reference/expressions/operators/operators.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export const operators = {
{ typa: 'int', typb : 'int', typr: 'rational' },
{ typa: 'duration', typb : 'duration', typr: 'rational' },
{ typa: 'rational', typb : 'rational', typr: 'rational' },
{ typa: 'tez', typb : 'tez', typr: 'rational' },
],
promotions: [
{ typa: 'nat', typb : 'int', typr: 'rational' },
Expand Down
2 changes: 1 addition & 1 deletion src/components/desc/get_desc.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ It is equivalent to:
const h =
match ledger.get(caller) with
| some av -> av
| none -> fail(("ledger","AssetNotFound"))
| none -> fail(("ledger","ASSET_NOT_FOUND"))
end
```
2 changes: 1 addition & 1 deletion src/components/desc/opt_get_desc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Extracts some value from optional value `o`. It is equivalent to the following e
```archetype
match o with
| some(v) -> v
| none -> fail("NotFound")
| none -> fail("NOT_FOUND")
end
```
2 changes: 1 addition & 1 deletion src/theme/prism-archetype.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'verif': /\b(?:invariant|specification)\b/,
'type': /\b(?:lambda|contract|big_map|map|set|option|list|int|nat|tez|string|rational|bytes|key|key_hash|address|sapling|signature|date|duration|bool|operation|aggregate|partition|asset_view|asset_key|asset_value|iterable_big_map)\b/,
'constant': /\b(?:now|balance|transferred|self|caller|source|self_address|state|operations)\b/,
'control': /\b(?:assert|iter|begin|end|do|done|else|return|before|for|if|in|match|in|forall|added|removed|exists|then|the|from|to|while|with|InvalidCondition|InvalidCaller|NotFound|NatAssign|SliceError|DivByZero|OutOfBound)\b/,
'control': /\b(?:assert|iter|begin|end|do|done|else|return|before|for|if|in|match|in|forall|added|removed|exists|then|the|from|to|while|with|InvalidCondition|InvalidCaller|NotFound|NatAssign|SliceError|DIV_BY_ZERO|OUT_OF_BOUND)\b/,
'decl': /\b(?:const|var|let some|let)\b/,
'boolean': /\b(?:false|true)\b/,
'logic': /\b(?:and|or|=|not|asr|land|lor|lsl|lsr|lxor)\b/,
Expand Down

0 comments on commit 88edaeb

Please sign in to comment.