C/Rust 是一种编译为 Lua 代码的编程语言
Clue is a programming language that compiles blazingly fast into Lua code with a syntax similar to languages like C or Rust.
Clue tries to be almost as simple as Lua (with only a slightly more advanced syntax) but adds many optional features that can make code look better or make some things (like metatables) easier to code.
Clue does not compile to a specific version of Lua: flags can be toggled to alter the output to allow most if not all versions or modifications of Lua to be compiled to with Clue.
{} instead of then/do/repeat and end/until// ... or /* ... */If you want a complete documentation of every change and addition in Clue check the wiki.
@ifos linux {
@define GREETING "Hello, Linux user "
} @else_ifos macos {
@define GREETING "Hello, MacOS user "
} @else {
@define GREETING "Hello, Windows user "
}
@macro GREET(target) { $GREETING .. $target .. "!" }
print($GREET!("Maiori"))
local fn add(x = 0, y = 0) {
return x + y
}
global n = 1
while n {
continue
}
4 if x => {
break
}
default => {
print(n _.debsudo rpm -i clue-..rpmparu -S clueyay -S cluegit clone https://aur.archlinux.org/clue.git
cd clue
makepkg -siclue.exe in the PATH variableclue in your cmd/PowerShell to run the compiler, it will explain the restThere are still features that I'm considering adding and others that will be added soon. The most likely ones to be added in the future are:
For any suggestion or bug you can make a github issue. If you need help with the language itself, you can check out the Discord server.
I hope Clue will be useful to you :)
I have no clue.
暂无开放 Issues,或尚未同步最近议题。