pr 08 lsp

This commit is contained in:
2026-03-24 13:40:29 +00:00
parent 912b9b0075
commit 06b49cf433
10 changed files with 448 additions and 98 deletions
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
{
"prometeuPbs.serverPath": "/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/target/debug/prometeu-lsp --studio"
}
@@ -1,11 +1,42 @@
import { Color, Gfx } from "@sdk:gfx";
import { Input } from "@sdk:input";
declare struct Vec2(x: int, y: int)
[
(x: int, y: int): (x, y) as default { }
(s: int): (s, s) as square { }
]
[[
ZERO: square(0)
]]
{
fn getX(self: this): int {
return x;
}
fn getY(self: this): int {
return y;
}
}
fn add(a: int, b: int): int {
return a + b;
}
fn is_higher(a: int, b: int): bool {
let c: int = a + b;
return c >= 30;
}
fn add2(a: int, b: int): int {
let c = add(a, b);
return c;
}
fn frame(): void {
let zero = Vec2.ZERO;
let zz = add(zero.getX(), zero.getY());
// 1. Locals & Arithmetic
let x = 10;
let y = 20;