Dino compiler: language, formatter, language server, docs, editor support
Compiler in Rust (lexer, parser, checker, C codegen), maps, chars, dino fmt, dino lsp (diagnostics, formatting, outline, definition, hover, completion, signature help), docs, examples, VS Code/Vim files. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3e2779f447
commit
eaf9567a36
117 files changed
+19970
No files matched your search
@@ -0,0 +1,23 @@
|
||||
const PI = 3.14159
|
||||
|
||||
func area(r: float): float {
|
||||
return PI * r * r
|
||||
}
|
||||
|
||||
func average(a, b: int): float {
|
||||
return float(a + b) / 2
|
||||
}
|
||||
|
||||
func main() {
|
||||
print("area:", area(2))
|
||||
print("avg:", average(3, 4))
|
||||
print(10 / 3, 10 % 3, 10.0 / 4)
|
||||
print(int(7.9), float(3))
|
||||
var x: float = 1
|
||||
x *= 2.5
|
||||
print(x, x > 2, -x)
|
||||
print("whole float:", 2.0 * 3)
|
||||
var big = 9223372036854775807
|
||||
big += 1
|
||||
print("wraps:", big)
|
||||
}
|
||||
Reference in new issue
Block a user