Commit b460c84b authored by Laszlo Domoszlai's avatar Laszlo Domoszlai

some more new per type primitive functions

parent 10a75182
......@@ -243,7 +243,19 @@
"inline_exp":":!1: || :!2:"
},
{
"sapl_fun":"toString",
"sapl_fun":"I2S",
"arity":1,
"ext_fun":"_toString",
"inline_exp":":!1: + \"\""
},
{
"sapl_fun":"C2S",
"arity":1,
"ext_fun":"_toString",
"inline_exp":":!1: + \"\""
},
{
"sapl_fun":"R2S",
"arity":1,
"ext_fun":"_toString",
"inline_exp":":!1: + \"\""
......@@ -290,6 +302,12 @@
"arity":3,
"ext_fun":"_string_update",
"inline_exp":":!1:.replaceAt(:!2:,:!3:)"
},
{
"sapl_fun":"string_update_copy",
"arity":3,
"ext_fun":"_string_update",
"inline_exp":":!1:.replaceAt(:!2:,:!3:)"
},
{
"sapl_fun":"string_slice",
......@@ -310,31 +328,43 @@
"inline_exp":"_string_replace(:!1:,:!2:,:!3:)"
},
{
"sapl_fun":"toIntC",
"sapl_fun":"C2I",
"arity":1,
"ext_fun":"_toInt_char",
"inline_exp":":!1:.charCodeAt(0)"
},
{
"sapl_fun":"toIntS",
"sapl_fun":"S2I",
"arity":1,
"ext_fun":"_toInt_str",
"inline_exp":"parseInt(:!1:)"
},
{
"sapl_fun":"toIntR",
"sapl_fun":"R2I",
"arity":1,
"ext_fun":"_toInt_real",
"inline_exp":"Math.floor(:!1:)"
},
{
"sapl_fun":"toReal",
"sapl_fun":"I2R",
"arity":1,
"ext_fun":"_toReal",
"inline_exp":"parseFloat(:!1:)"
},
{
"sapl_fun":"R2R",
"arity":1,
"ext_fun":"_toReal",
"inline_exp":"parseFloat(:!1:)"
},
{
"sapl_fun":"S2R",
"arity":1,
"ext_fun":"_toReal",
"inline_exp":"parseFloat(:!1:)"
},
{
"sapl_fun":"toChar",
"sapl_fun":"I2C",
"arity":1,
"ext_fun":"_toChar",
"inline_exp":"String.fromCharCode(:!1:)"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment