17 Star 56 Fork 8

深度社区/unilang

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
std.txt 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
He Bin 提交于 2022-09-08 09:42 . std.txt: Fixed the use of 'rest'.
"SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co.,Ltd.",
"Unilang standard library initialization.";
"This file is a component of Unilang installation.",
"To keep the environment well-formed,",
" users shall not modify the content in this file.";
$def! std.classes $let ()
(
$def! impl__ $provide!
(
class?
make-class
object?
make-object
$access
)
(
$def! (encapsulate-class% class? decapsulate-class)
() make-encapsulation-type;
$defl! make-class (base ctor)
encapsulate-class% (list base ctor);
$defl! ctor-of (c) first (rest% (decapsulate-class c));
$defl! base-of (c) first (decapsulate-class c);
$defl! apply-ctor (c self args)
apply (ctor-of c) (list* self args);
$def! (encapsulate-object% object? decapsulate-object)
() make-encapsulation-type;
$defl! make-object (c .args)
(
$def! self () make-environment;
$def! base base-of c;
$if (null? base) () (apply-ctor base self ());
apply-ctor c self args;
encapsulate-object% (move! self)
);
$defv%! $access (&o &id) d
eval% id (decapsulate-object (eval% o d));
);
() lock-current-environment
);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/linuxdeepin/unilang.git
git@gitee.com:linuxdeepin/unilang.git
linuxdeepin
unilang
unilang
master

搜索帮助