diff --git a/ide/.gitignore b/ide/.gitignore new file mode 100644 index 0000000..ca98cd9 --- /dev/null +++ b/ide/.gitignore @@ -0,0 +1,2 @@ +/target/ +Cargo.lock diff --git a/ide/examples/hello-project/manifest.el b/ide/examples/hello-project/manifest.el new file mode 100644 index 0000000..af6f4a1 --- /dev/null +++ b/ide/examples/hello-project/manifest.el @@ -0,0 +1,3 @@ +package "hello" { + version "0.1.0" +} diff --git a/ide/examples/hello-project/src/main.el b/ide/examples/hello-project/src/main.el new file mode 100644 index 0000000..09d5c5c --- /dev/null +++ b/ide/examples/hello-project/src/main.el @@ -0,0 +1,41 @@ +fn main() -> Void { + let greeting: String = "Hello from Engram" + let count: Int = 42 +} + +type Point { + x: Float + y: Float +} + +fn distance(a: Point, b: Point) -> Float { + let dx: Float = a.x - b.x + let dy: Float = a.y - b.y + return dx * dx + dy * dy +} + +type Circle { + center: Point + radius: Float +} + +enum Shape { + Dot + Line(String) + Polygon(Int) +} + +fn classify(s: Shape) -> String { + match s { + Shape::Dot => "point" + Shape::Line(name) => name + Shape::Polygon(sides) => "polygon" + } +} + +// activate example — spreading activation query +// let circles: [Circle] = activate Circle where "large circles near origin" + +sealed { + let api_key: String = "secret-key" +} diff --git a/ide/ide/index.html b/ide/ide/index.html new file mode 100644 index 0000000..61208e5 --- /dev/null +++ b/ide/ide/index.html @@ -0,0 +1,5481 @@ + + +
+ + +| Save file | Cmd + S |
| Close tab | Cmd + W or middle-click |
| Cycle tabs | Cmd + Tab |
| Switch to tab 1-9 | Cmd + 1…9 |
| Find / Replace | Cmd + F / H |
| Search project | Cmd + Shift + F |
| Quick open files | Cmd + P |
| Command palette | Cmd + Shift + P or > in open |
| Go to definition | F12 |
| Find references | Shift + F12 |
| Build | Cmd + B |
| Fold / Unfold | Cmd + [ / ] |
| Close menu / modal | Esc |
Backend running. UI bundle missing at "), path), EL_STR(".
Backend running. UI bundle missing at " + path + ".
Backend running. UI bundle missing at " + path + ".