Skip to content

Commit 9502ea8

Browse files
committed
feat: update lsp wasm
1 parent fd146e1 commit 9502ea8

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

src/constant/monacoCodes.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn getFibonacci(n: i64) i64 {
3434
title: 'fixed point',
3535
code: `use core::panic;
3636
pub fn main() i64 {
37-
let g = |f: |i64| => i64, x: i64| => i64 {
37+
let g = |f, x| => {
3838
if x == 0 {
3939
return 1;
4040
}
@@ -59,19 +59,16 @@ impl<A|F> Func<A|F> {
5959
}
6060
6161
fn Y<A|R>(g: ||A| => R, A| => R) |A| => R {
62-
return |x: A| => R {
63-
let in = |f: Func<A|R>, x: A| => R {
62+
return |x| => {
63+
return |f, x| => {
6464
return f.call(f, x);
65-
};
66-
let field = |f: Func<A|R>, x: A| => R {
67-
return g(|x: A| => R {
68-
return f.call(f, x);
69-
}, x);
70-
};
71-
let f = Func{
72-
f: field
73-
};
74-
return in(f, x);
65+
}(Func{
66+
f: |f, x| => {
67+
return g(|x| => {
68+
return f.call(f, x);
69+
}, x);
70+
}
71+
}, x);
7572
};
7673
}
7774
@@ -82,6 +79,7 @@ fn fact_recursion(x: i64) i64 {
8279
return x * fact_recursion(x - 1);
8380
}
8481
82+
8583
`,
8684
},
8785
{
@@ -139,7 +137,7 @@ use core::panic::assert;
139137
use core::eq::*;
140138
141139
fn main() i64 {
142-
let table = hashtable::new_hash_table<string|string>(10 as u64, 1 as u64);
140+
let table = hashtable::new_hash_table(10 as u64, 1 as u64);
143141
table.insert("hello","world");
144142
table.insert("bye","bye");
145143
assert(table.get("hello") is string);

src/hooks/monaco/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"registry": "https://registry.npmjs.org/"
3232
},
3333
"dependencies": {
34-
"@pivot-lang/pivot-lang": "0.1.2-be67dea.0",
34+
"@pivot-lang/pivot-lang": "0.1.2-ed16221.0",
3535
"monaco-editor": "^0.37.1",
3636
"monaco-themes": "^0.4.4",
3737
"vscode-languageserver-types": "^3.17.3"

src/hooks/monaco/pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)