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 endDictionary Pattern Matching
case %{a: b} as {a : &b+1} => 1 as {a : &b } => 2 endFunction 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对照
English |
中文 |
|---|---|
then |
然后 |
when |
当 |
and |
并且 |
or |
或者 |
in |
含于 |
not |
非 |
case |
对于 |
as |
作为 |
end |
结束 |
where |
其中 |
from |
从 |
import |
导入 |
yield |
生成 |
into |
跳跃到 |
let |
使/让 |
True |
真 |
False |
假 |
None |
空 |
is |
是 |
. |
之 |
它 |
它 |
= |
等于 |
Metadata
Release files for remlang 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| remlang-0.5-py3-none-any.whl | Python 3 | none | any | Details |
Release files / remlang-0.5-py3-none-any.whl
| Download URL | remlang-0.5-py3-none-any.whl |
|---|---|
| Size | 29.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d628b36aa6a2257dc43aeab3c5a61ae7dbb6bd5d00f0d2776de10be1ab0f3c38
|
|
BLAKE2b-256 checksum How to use checksums |
e18588ee745a52a45c9d83567943250c43872eed5591685503ac7779a0645341
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |