rem langauge, which is very comfortable.
Project description
Rem Langauge
Just use PyPI. Recommend to install cytoolz before installing Rem to speed up function invocations.
pip install remlang
Some Supported Features
See all features at Inrtoduction.
- Currently support case syntax.
case expr as destruction [when condition] => statements end
Dictionary Pattern Matching
case %{a: b} as {a : &b+1} => 1 as {a : &b } => 2 end
Function Parameter Destruction
>> {|(1, 2, c)| c*2} (1, 2, 3) => 6
**Inverted Syntax** (see the priority table in the linked page)
file . open . write some_text
. has a high priority while then has a lower one.
Into Statement(just like goto)
关于中文编程
Rem 支持中文编程, 因为它的tokenizer可以被动态操控,在任意一个Rem模块里,均有一个__compiler__对象, 负责处理输入语句到ast的转换。当下内置了一个无参函数中文编程, 便可以使用中文关键字。
>> call 中文编程 >> 对于 [3, 2] 作为 [甲, 乙] => 甲 * 乙 结束 # 等价于 case [3, 2] as [甲, 乙] => 甲 * 乙 end => 6
中英文token对照
{ '然后': '`then`', '当': '`when`', '并且': '`and`', '或者': '`or`', '含于': '`in`', '非': '`not`', '对于': '`case`', '作为': '`as`', '结束': '`end`', '其中': '`where`', '从': '`from`', '生成': '`yield`', '跳跃到': '`into`', '使': '`let`', '让': '`let`', '真': '`True`', '假': '`False`', '空': '`None`', '导入': '`import`', '是': '`is`', '之': '.', }
用事实证明中文编程的反人类。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
remlang-0.4.5.3-py3-none-any.whl
(28.9 kB
view hashes)
Close
Hashes for remlang-0.4.5.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ab42403515af7f2e38e3c6d62fa1e40839cf613ba35e0e6cfdfc869afc3ff28 |
|
MD5 | 975d664c38aee4500621b20eb76dec03 |
|
BLAKE2b-256 | 04e64ba7d7af5478cc578fe0bf0275cc8a7e27d13ef5ec7cac4b74701683e460 |