diff options
author | Sami Mäkelä <mrsmkl@gmail.com> | 2017-08-16 03:15:43 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-11-22 11:33:07 +0800 |
commit | 16f81871669f205e11d7965a989b6f467f80c5d6 (patch) | |
tree | e05ead0f0917ae516104c5201810ec1203769fc0 /docs | |
parent | d4452d8c1fc5b3a564329097fa72e66798946a9b (diff) | |
download | dexon-solidity-16f81871669f205e11d7965a989b6f467f80c5d6.tar.gz dexon-solidity-16f81871669f205e11d7965a989b6f467f80c5d6.tar.zst dexon-solidity-16f81871669f205e11d7965a989b6f467f80c5d6.zip |
added Switch specification
Diffstat (limited to 'docs')
-rw-r--r-- | docs/julia.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/julia.rst b/docs/julia.rst index 2f0b7d28..c10e3d29 100644 --- a/docs/julia.rst +++ b/docs/julia.rst @@ -248,6 +248,19 @@ We will use a destructuring notation for the AST nodes. G, L, break E(G, L, continue: BreakContinue) = G, L, continue + E(G, L, <switch condition case l1:t1 st1 ... case ln:tn stn>: Switch) = + E(G, L, switch condition case l1:t1 st1 ... case ln:tn stn default {}) = + E(G, L, <switch condition case l1:t1 st1 ... case ln:tn stn default st'>: Switch) = + let G0, L0, v = E(G, L, condition) + // i = 1 .. n + // Evaluate literals, context doesn't matter + let G0, L0, v1 = E(G0, L0, l1) + ... + let G0, L0, vn = E(G0, L0, ln) + if there exists smallest i such that vi = v: + E(G0, L0, sti) + else: + E(G0, L0, st') E(G, L, <name>: Identifier) = G, L, L[$name] |