From 0097e306a1e3b53e4cda304aac82b8778036eddf Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 11 Jul 2018 21:17:42 -0400 Subject: - Got rid of "lux text replace-once" and "lux text replace-all" extensions. --- .../lang/translation/js/procedure/common.jvm.lux | 36 ++++++---------------- 1 file changed, 9 insertions(+), 27 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux index d9e64d4a1..05cd0137b 100644 --- a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux @@ -270,22 +270,13 @@ (format "String.fromCharCode" "(" (int//to-frac inputJS) ")")) ## [[Text]] -(do-template [ ] - [(def: ( inputJS) - Unary - (format inputJS ))] - - [text//size ".length"] - ) - -(do-template [ ] - [(def: ( [subjectJS paramJS]) - Binary - (format subjectJS "." "(" paramJS ")"))] +(def: (text//size inputJS) + Unary + (format inputJS ".length")) - [text//concat "concat"] - [text//contains? "includes"] - ) +(def: (text//concat [subjectJS paramJS]) + Binary + (format subjectJS "." "concat" "(" paramJS ")")) (def: (text//char [subjectJS paramJS]) Binary @@ -296,18 +287,11 @@ Trinary (format "(" subjectJS "," paramJS "," extraJS ")"))] - [text//clip runtimeT.text//clip] - [text//replace-all runtimeT.text//replace-all] + [text//clip runtimeT.text//clip] + [text//index runtimeT.text//index] + ) -(def: (text//replace-once [subjectJS paramJS extraJS]) - Trinary - (format subjectJS ".replace(" paramJS "," extraJS ")")) - -(def: (text//index [textJS partJS startJS]) - Trinary - (format runtimeT.text//index "(" textJS "," partJS "," startJS ")")) - ## [[Math]] (do-template [ ] [(def: ( inputJS) @@ -466,8 +450,6 @@ (install "index" (trinary text//index)) (install "size" (unary text//size)) (install "hash" (unary text//hash)) - (install "replace-once" (trinary text//replace-once)) - (install "replace-all" (trinary text//replace-all)) (install "char" (binary text//char)) (install "clip" (trinary text//clip)) ))) -- cgit v1.2.3