Rename the language from Dino to Rex
Files use .rex, the command is rex, and the crate, runtime prefixes, docs, editor files and examples all use the new name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2f44f09b6a
commit
7cf9727bcd
94 files changed
+858
-858
No files matched your search
@@ -0,0 +1,33 @@
|
||||
func say(msg: string, v: int): int {
|
||||
print(msg)
|
||||
return v
|
||||
}
|
||||
|
||||
func add(a, b, c: int): int {
|
||||
return a + b + c
|
||||
}
|
||||
|
||||
func yes(msg: string): bool {
|
||||
print(msg)
|
||||
return true
|
||||
}
|
||||
|
||||
func no(msg: string): bool {
|
||||
print(msg)
|
||||
return false
|
||||
}
|
||||
|
||||
func main() {
|
||||
print("arguments run left to right:")
|
||||
print(add(say("first", 1), say("second", 2), say("third", 3)))
|
||||
|
||||
print("&& and || short-circuit:")
|
||||
if no("A") && yes("B") {
|
||||
print("unreachable")
|
||||
}
|
||||
if yes("C") || yes("D") {
|
||||
print("done")
|
||||
}
|
||||
var ok = no("E") || yes("F") && yes("G")
|
||||
print(ok)
|
||||
}
|
||||
Reference in new issue
Block a user