diff options
author | Eduardo Julian | 2018-07-04 22:38:56 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-04 22:38:56 -0400 |
commit | 376ed521cd92c2c53f2e9cc3cb16b85b67e2fdea (patch) | |
tree | 338f244cf5e7b53dc43724c826285689481808b5 /new-luxc/source/luxc/lang/translation/js | |
parent | 4bc58162f3d381abf33c936eafc976a2f422258c (diff) |
- Re-named "degree" to "revolution".
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/js')
3 files changed, 6 insertions, 22 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js/case.jvm.lux b/new-luxc/source/luxc/lang/translation/js/case.jvm.lux index 3abd8c55c..fc01a9d7c 100644 --- a/new-luxc/source/luxc/lang/translation/js/case.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/case.jvm.lux @@ -100,7 +100,7 @@ (wrap (format "if(!" (format runtimeT.int//= "(" peek-cursor "," valueJS ")") ") { " fail-pattern-matching " }")))) ([#.Nat primitiveT.translate-nat] [#.Int primitiveT.translate-int] - [#.Deg primitiveT.translate-deg]) + [#.Rev primitiveT.translate-rev]) (^template [<tag> <format>] [_ (<tag> value)] diff --git a/new-luxc/source/luxc/lang/translation/js/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/js/expression.jvm.lux index ba6c63e8f..8a5e73c75 100644 --- a/new-luxc/source/luxc/lang/translation/js/expression.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/expression.jvm.lux @@ -45,7 +45,7 @@ ([#.Bool primitiveT.translate-bool] [#.Nat primitiveT.translate-nat] [#.Int primitiveT.translate-int] - [#.Deg primitiveT.translate-deg] + [#.Rev primitiveT.translate-rev] [#.Frac primitiveT.translate-frac] [#.Text primitiveT.translate-text]) diff --git a/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux index 5fedc9a9e..753f1ce45 100644 --- a/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux @@ -15,27 +15,11 @@ (def: low-mask Nat (dec (bit.left-shift +32 +1))) -(def: #export (translate-nat value) - (-> Nat (Meta Expression)) - (let [high (|> value - (bit.logical-right-shift +32) - .int %i) - low (|> value - (bit.and low-mask) - .int %i)] - (meta/wrap (format runtimeT.int//new "(" high "," low ")")))) - -(def: #export translate-int +(def: #export (translate-int value) (-> Int (Meta Expression)) - (|>> .nat translate-nat)) - -(def: deg-to-nat - (-> Deg Nat) - (|>> (:coerce Nat))) - -(def: #export translate-deg - (-> Deg (Meta Expression)) - (|>> deg-to-nat translate-nat)) + (let [high (|> value (bit.logical-right-shift +32) %i) + low (|> value (bit.and low-mask) %i)] + (meta/wrap (format runtimeT.int//new "(" high "," low ")")))) (def: #export translate-frac (-> Frac (Meta Expression)) |