简介
Collie 是一个静态类型的编程语言,旨在提供简洁的语法和强大的类型系统。
语言特性
- 静态类型系统
- 函数和过程
- 控制流语句(if-else, while, for)
- 块作用域
- Unicode 支持(UTF-8 / UTF-16)
- 多行字符串
- 丰富的数据类型(number, string, char, bool)
文档
贡献
欢迎提交 Issue 和 Pull Request!
指南
编译与运行
请参考 编译和运行指南
项目结构
root/
├── compiler/ # 编译器源代码
│ ├── lexer/ # 词法分析器
│ ├── parser/ # 语法分析器
│ └── tests/ # 单元测试
├── docs/ # 文档
│ ├── Internal/ # 内部开发文档
│ └── README.md # 项目说明
└── CMakeLists.txt # CMake 配置文件
许可证
BSD-3-Clause License
BSD 3-Clause License
Copyright (c) 2025, Zhang Bokai
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.