前言
做个笔记,持续更新
备注
- 支持C语言的标注法:/* xxxx*/ 和 //
include
- 支持类似C语言的include,推荐使用<>,不允许使用 \
#include <SliceDefs/Clock.ice>
枚举
- 允许枚举
#if defined(__ICE_VERSION__) && __ICE_VERSION__ >= 030500
enum Fruit { Apple, Pear = 3, Orange }
#else
enum Fruit { Apple, Pear, Orange }
#endif
切片编译器
- 为每个语言定义了宏,以便用户自定义Slice。我用不上,先放着
转义
- 当定义的函数名和内置方法名重复时,需要用 \ 进行转义
struct dictionary // Error!
{
// ...
}
struct \dictionary // OK
{
// ...
}
struct \foo // Legal, same as "struct foo"
{
// ...
}
model
- 所有内容都应该包含在model里面
module Zero