diff options
author | Eduardo Julian | 2018-07-11 22:21:23 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-11 22:21:23 -0400 |
commit | 81480739f4c5caa468b295eb047e5844d39701ca (patch) | |
tree | c0b95639cd9427f8ecf57220a38b413fb9845145 /new-luxc/source/luxc/lang/translation/lua | |
parent | f76922dfef6e88db854a27dc17987ccdc9736d6a (diff) |
- Removed "lux text hash" extension.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux | 2 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux | 12 |
2 files changed, 1 insertions, 13 deletions
diff --git a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux index 7497aeca2..c750bbaf4 100644 --- a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux @@ -255,7 +255,6 @@ (|> inputO <transform>))] [frac//to-int (<| (lua.apply "math.floor") (list))] - [text//hash runtimeT.text//hash] ) (def: int//char @@ -428,7 +427,6 @@ (install "concat" (binary text//concat)) (install "index" (trinary text//index)) (install "size" (unary text//size)) - (install "hash" (unary text//hash)) (install "char" (binary text//char)) (install "clip" (trinary text//clip)) ))) diff --git a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux index 9e7dc7422..2c0dfec17 100644 --- a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux @@ -207,21 +207,11 @@ (lua.return! none) (lua.return! (some "char")))))) -(runtime: (text//hash input) - (lua.block! (list (lua.local! "hash" (#.Some (lua.int 0))) - (lua.for-step! "idx" (lua.int 1) (lua.apply "string.len" (list input)) (lua.int 1) - (lua.set! "hash" (|> "hash" - (lua.bit-shl (lua.int 5)) - (lua.- "hash") - (lua.+ (lua.apply "string.byte" (list input "idx")))))) - (lua.return! "hash")))) - (def: runtime//text Runtime (format @@text//index @@text//clip - @@text//char - @@text//hash)) + @@text//char)) (def: (check-index-out-of-bounds array idx body!) (-> Expression Expression Statement Statement) |