Skip to content

Commit

Permalink
feat: update lsp wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronostasys committed Jan 23, 2024
1 parent fd146e1 commit 9502ea8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
26 changes: 12 additions & 14 deletions src/constant/monacoCodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn getFibonacci(n: i64) i64 {
title: 'fixed point',
code: `use core::panic;
pub fn main() i64 {
let g = |f: |i64| => i64, x: i64| => i64 {
let g = |f, x| => {
if x == 0 {
return 1;
}
Expand All @@ -59,19 +59,16 @@ impl<A|F> Func<A|F> {
}
fn Y<A|R>(g: ||A| => R, A| => R) |A| => R {
return |x: A| => R {
let in = |f: Func<A|R>, x: A| => R {
return |x| => {
return |f, x| => {
return f.call(f, x);
};
let field = |f: Func<A|R>, x: A| => R {
return g(|x: A| => R {
return f.call(f, x);
}, x);
};
let f = Func{
f: field
};
return in(f, x);
}(Func{
f: |f, x| => {
return g(|x| => {
return f.call(f, x);
}, x);
}
}, x);
};
}
Expand All @@ -82,6 +79,7 @@ fn fact_recursion(x: i64) i64 {
return x * fact_recursion(x - 1);
}
`,
},
{
Expand Down Expand Up @@ -139,7 +137,7 @@ use core::panic::assert;
use core::eq::*;
fn main() i64 {
let table = hashtable::new_hash_table<string|string>(10 as u64, 1 as u64);
let table = hashtable::new_hash_table(10 as u64, 1 as u64);
table.insert("hello","world");
table.insert("bye","bye");
assert(table.get("hello") is string);
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/monaco/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"registry": "https://registry.npmjs.org/"
},
"dependencies": {
"@pivot-lang/pivot-lang": "0.1.2-be67dea.0",
"@pivot-lang/pivot-lang": "0.1.2-ed16221.0",
"monaco-editor": "^0.37.1",
"monaco-themes": "^0.4.4",
"vscode-languageserver-types": "^3.17.3"
Expand Down
8 changes: 4 additions & 4 deletions src/hooks/monaco/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9502ea8

Please sign in to comment.