【文件属性】:
文件名称:presh:不变的解释表达语言
文件大小:217KB
文件格式:ZIP
更新时间:2021-05-25 08:08:35
JavaScript
普雷什
用于安全评估javascript中任意功能的ex'presh'n语言。
目标
高度功能化,无状态,易于添加范围,表达性,可读性。
尝试
特征
隐式回报。
halve(x){ x / 2 }
halve(2) -> 1
仅常数分配。
x = 5 <- Yep
x = 4 <- Nope!
a = { foo: 'bar' } <- Sure.
a.foo = 'baz' <- Nope!
var, let, const <- Nope nope nope!
namedFunction(x){ ... } <- Sure!
范围。
[1..10] -> [1,2,3,4,5,6,7,8,9,10]
[10..1] -> [10,9,8,7,6,5,4,3,2,1]
[-2..2] -> [-2,-1,0,1,2]
传播(应用,数组,对象)
申请:
sum(...ar
【文件预览】:
presh-master
----global.js(682B)
----lex.js(5KB)
----bin()
--------presh(778B)
----example()
--------index.js(2KB)
--------index.html(97B)
--------index.browser.js(130KB)
--------style.css(348B)
----index.js(385B)
----package.json(1KB)
----parse.js(11KB)
----.github()
--------workflows()
----test()
--------test.pr(5B)
--------index.js(12KB)
--------index.html(40B)
--------index.browser.js(712KB)
--------cli.js(1KB)
----execute.js(8KB)
----printError.js(912B)
----LICENSE(1KB)
----operators.js(6KB)
----toValue.js(641B)
----scope.js(2KB)
----.gitignore(18B)
----.npmrc(18B)
----README.md(3KB)