Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Aleo and Leo language support #6551

Closed
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a7f7202
Adds Aleo & Leo to languages.yml, samples, and grammar
Sep 19, 2023
34b3d5e
adds Leo and Aleo to languages.yml, their samples, and their grammar
Sep 19, 2023
3af2c58
Update languages.yml to include new color
Sep 25, 2023
1f58d8c
Update languages.yml change color hex to uppercase for Leo and Aleo
Sep 25, 2023
e68b00c
removing basic_bank examples, updating grammars, and adding credits.a…
Sep 27, 2023
4d41fd5
Update .gitmodules to remove ABNF grammars.
Sep 27, 2023
74ab427
Delete samples/Aleo/credits.aleo
Sep 27, 2023
e4f21de
update submodules to sync with grammars post test completion
Sep 28, 2023
a30877e
removing old samples and adding new ones that are more aligned
Sep 28, 2023
507eb6f
fixing submodules problem and the languages.yml location for Aleo re …
Sep 28, 2023
2179a88
adding grammars
Sep 28, 2023
9214578
fixing samples for *.aleo files
Sep 28, 2023
2318faf
Update mapping_operations.aleo
Sep 28, 2023
043e029
Update mapping_operations.aleo
Sep 28, 2023
5060f6e
fix licenses
Sep 28, 2023
b82b48d
removing submodules so that I can re-add them with the new licenses a…
Sep 29, 2023
0af1471
readding submodules with updated licenses
Sep 29, 2023
6513642
removing all submodule files because the new license is being added
Sep 29, 2023
cb549b6
removing all submodule files because the new license is being added
Sep 29, 2023
df4400f
fixed deatched head for submodule to master which update submodules a…
Sep 29, 2023
255adaf
Merge branch 'master' into Add-Aleo-and-Leo-Language-Support
Dec 6, 2023
74575f9
Merge branch 'master' into Add-Aleo-and-Leo-Language-Support
lildude Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -1335,3 +1335,6 @@
[submodule "vendor/grammars/zephir-sublime"]
path = vendor/grammars/zephir-sublime
url = https://github.com/phalcon/zephir-sublime
[submodule "vendor/grammars/grammars"]
path = vendor/grammars/grammars
url = https://github.com/AleoHQ/grammars.git
17 changes: 17 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ AL:
tm_scope: source.al
ace_mode: text
language_id: 658971832
Aleo:
type: programming
color: "#154BF9"
extensions:
- ".aleo"
tm_scope: source.aleo
ace_mode: text
language_id: 566431048
AMPL:
type: programming
color: "#E6EFBB"
Expand Down Expand Up @@ -3690,6 +3698,15 @@ Lean:
tm_scope: source.lean
ace_mode: text
language_id: 197
Leo:
type: programming
color: "#6814EC"
extensions:
- ".leo"
tm_scope: source.leo
ace_mode: text
wrap: true
language_id: 916034822
Less:
type: markup
color: "#1d365d"
Expand Down
35 changes: 35 additions & 0 deletions samples/Aleo/auction.aleo
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
program auction.aleo;

record Bid:
owner as address.private;
bidder as address.private;
amount as u64.private;
is_winner as boolean.private;


function place_bid:
input r0 as address.private;
input r1 as u64.private;
assert.eq self.caller r0;
cast aleo1fxs9s0w97lmkwlcmgn0z3nuxufdee5yck9wqrs0umevp7qs0sg9q5xxxzh r0 r1 false into r2 as Bid.record;
output r2 as Bid.record;


function resolve:
input r0 as Bid.record;
input r1 as Bid.record;
assert.eq self.caller aleo1fxs9s0w97lmkwlcmgn0z3nuxufdee5yck9wqrs0umevp7qs0sg9q5xxxzh;
gte r0.amount r1.amount into r2;
ternary r2 r0.owner r1.owner into r3;
ternary r2 r0.bidder r1.bidder into r4;
ternary r2 r0.amount r1.amount into r5;
ternary r2 r0.is_winner r1.is_winner into r6;
cast r3 r4 r5 r6 into r7 as Bid.record;
output r7 as Bid.record;


function finish:
input r0 as Bid.record;
assert.eq self.caller aleo1fxs9s0w97lmkwlcmgn0z3nuxufdee5yck9wqrs0umevp7qs0sg9q5xxxzh;
cast r0.bidder r0.bidder r0.amount true into r1 as Bid.record;
output r1 as Bid.record;
Loading