Commit Graph

336 Commits

Author SHA1 Message Date
damirka
234eabd81c fixes comments 2021-03-15 16:32:43 +03:00
damirka
b58db80005 updates after @collinc97 comments 2021-03-15 16:29:45 +03:00
gluax
3a1c29e3b2 ready to return real errors, fixed Self outside circuit bugs 2021-03-12 20:41:49 -05:00
gluax
88166a64f9 error on Self outside of cicuits 2021-03-12 18:29:53 -05:00
gluax
04f62cdd8c missing function output types 2021-03-12 16:59:08 -05:00
gluax
02e5f57eed compound assignments 2021-03-12 16:47:57 -05:00
gluax
4185f6f6d2 array types and expressions expanded 2021-03-12 16:19:07 -05:00
gluax
e302f839ed fix spelling 2021-03-12 14:34:20 -05:00
gluax
250c8ce5ec reducer clean up 2021-03-12 14:32:20 -05:00
Protryon
0c72e3e264 ident -> identifier 2021-03-12 10:40:05 -08:00
Protryon
344f6a2d8e transparent keywords 2021-03-12 04:29:25 -08:00
damirka
14d167a725 added tests for constants 2021-03-12 13:56:38 +03:00
damirka
1551a82e18 Adds [constants] section to input file:
```
[constants]
x: bool = true; // will be constant in program
y: u32 = 100;
```
2021-03-11 23:07:01 +03:00
damirka
47e4d23ab1 staging commit with const input syntax and constants processing 2021-03-11 19:05:08 +03:00
gluax
476307fffc there could be more instances where expressions might need to be matched 2021-03-10 13:27:06 -05:00
gluax
8e0ebd386a comment out replacing of self in circuit function input... not sure 2021-03-10 12:22:56 -05:00
gluax
9f126613d0 Self words replaced, still need to error for self/Self outside circuits 2021-03-10 12:11:54 -05:00
gluax
51c20ff07f fix some reducer bugs, still more to implement/make function better 2021-03-09 18:46:45 -05:00
gluax
78ae6f1f12 merge master 2021-03-09 16:13:43 -05:00
gluax
af5a708f8c reconstruction 2021-03-09 15:56:35 -05:00
Protryon
a6bf66f864 fix tests 2021-03-07 06:48:02 -08:00
Protryon
1f49d8bc44 Merge branch 'tokenizer' of github.com:AleoHQ/leo into tokenizer 2021-03-07 06:27:57 -08:00
Protryon
f5187fc872 fix some failing tests 2021-03-07 06:27:42 -08:00
collin
7cc331f219 fix formatting error 2021-03-05 16:11:39 -08:00
collin
10ecc6e6e2 merge master and fix build issues 2021-03-04 14:11:17 -08:00
howardwu
2e7b542b8b Format and clean up, enable default on snarkvm_algorithms 2021-03-04 11:09:24 -08:00
howardwu
4f50b44a63 itemize imports 2021-03-04 10:33:51 -08:00
Protryon
d400764e00 parser rewrite 2021-03-03 09:59:24 -08:00
gluax
38f5417571 last bit of clean up 2021-02-25 11:48:13 -05:00
gluax
e970194ed3 tuple const fixes, compiler tests 2021-02-24 11:48:00 -05:00
gluax
f7314625ff basic use case works, need to clean up, and test more advanced use cases 2021-02-23 14:38:50 -05:00
gluax
0b22e77301 refactor #define x 1u32-> const x: u32 = 1; 2021-02-22 15:57:33 -05:00
gluax
480e6345bb merge master, need to add defines into asg 2021-02-22 12:33:13 -05:00
gluax
f952da330c re-add syntax in, then add deprecation warning for it 2021-02-16 15:33:31 -05:00
gluax
42bea9e93a Merge branch 'master' of github.com:AleoHQ/leo into feature/515-eliminate-const-vars 2021-02-16 14:02:49 -05:00
bors[bot]
fa53e75f51
Merge #641
641: Bug/564 input array len not enforced r=collinc97 a=gluax

Resolves #564, depends on #563. The changes for this branch have pulled from PR #638, which is the PR that fixes #563.

Co-authored-by: gluaxspeed <jonathan.t.pavlik@gmail.com>
2021-02-11 21:41:53 +00:00
bors[bot]
d418b5330c
Merge #638
638: bug/563-array-input-wrong-dimensions r=collinc97 a=gluax

Closes #563. Fixes the array dimension builder when coming from the input file. Adds a test for it as well.

Co-authored-by: gluaxspeed <jonathan.t.pavlik@gmail.com>
2021-02-11 21:22:50 +00:00
bors[bot]
b72b5ac125
Merge #620
620: Feature/254 strengthen import rules r=collinc97 a=gluax

Grammar changes are a bit different than what was suggested in the original feature request #254. However, it should be logically equivalent and I think makes more sense on the rust side.

Closes #254 

Co-authored-by: gluaxspeed <jonathan.t.pavlik@gmail.com>
2021-02-11 07:31:56 +00:00
gluaxspeed
42fb5ea635 merge from pr 638 2021-02-10 11:59:42 -05:00
gluaxspeed
202f056531 fix pushed but depends on pr #638 2021-02-10 11:57:10 -05:00
gluaxspeed
d211d729d1 refactor pacakge_type -> package_or_packages 2021-02-09 10:57:37 -05:00
gluaxspeed
e48b971789 reverse iter for building array, add test case for it 2021-02-09 10:26:16 -05:00
gluaxspeed
f1bf6c90eb remove const keyword 2021-02-08 10:34:33 -05:00
gluaxspeed
26f9973e14 resolve merge conflict, asg + grammar tests 2021-02-05 14:20:48 -05:00
gluaxspeed
5fe61daa88 merge lastest master 2021-02-05 13:11:36 -05:00
Collin Chin
770f660f3a
Merge pull request #617 from AleoHQ/const-args
[Feature] Const Function Arguments
2021-02-04 23:05:51 -08:00
Collin Chin
a239e17bb6
Merge pull request #622 from AleoHQ/refactor/compiler
Adds ASG struct, updates ASG to support debug
2021-02-04 22:52:40 -08:00
howardwu
1b99c42470 Adds ASG struct, updates ASG to support debug 2021-02-04 19:21:17 -08:00
howardwu
96c20c6472 Update ast convention 2021-02-04 17:26:52 -08:00
Max Bruce
df8ecfc299
Update function_input.rs 2021-02-04 14:23:51 -08:00
gluaxspeed
9d881fd2a4 license fix 2021-02-04 15:15:36 -05:00
gluaxspeed
6ba556ceda fixed imports, but with different syntax that should be logical equivalent 2021-02-04 14:52:57 -05:00
Protryon
9c6eb23a1e const func arguments 2021-02-04 07:35:12 -08:00
gluaxspeed
8af1248c58 now works with asg 2021-02-04 09:34:05 -05:00
gluaxspeed
cd5811dfd6 merge asg/master, clean up ast implied circuit var 2021-02-03 10:26:08 -05:00
Protryon
80d5c87b8a asg 2021-02-02 11:08:56 -08:00
gluaxspeed
047b06d975 license fix 2021-02-02 13:44:20 -05:00
gluaxspeed
3106647f24 fix tests, some changes to do so 2021-02-02 13:38:15 -05:00
gluaxspeed
eb15269437 clean up a tad 2021-02-02 09:47:54 -05:00
howardwu
c935d6a486 Update license to 2021 2021-02-01 20:26:56 -08:00
gluaxspeed
1cbbee4517 allow static, and calls 2021-02-01 15:20:24 -05:00
gluaxspeed
7affb3e099 restrict self keyword to member access only 2021-02-01 13:04:20 -05:00
collin
38f65a7d81 Merge branch 'master' of github.com:AleoHQ/leo into asg-merge 2021-01-30 16:31:35 -05:00
gluaxspeed
16fcb1c681 syntax is recognized 2021-01-29 14:57:50 -05:00
gluaxspeed
3200a9cea1 pull latest master 2021-01-28 12:01:47 -05:00
gluaxspeed
6082fc9bf3 circuit grammar tests 2021-01-28 12:00:44 -05:00
gluaxspeed
c59ff6d107 implied circuit name works 2021-01-27 17:14:51 -05:00
gluaxspeed
2bda443d9c added more tests 2021-01-27 12:10:34 -05:00
collin
9d2c5587c9 return new AstError in ast main.rs 2021-01-26 14:55:16 -05:00
collin
d7cced6e53 rustup update && cargo clippy 2021-01-26 14:55:15 -05:00
gluaxspeed
c03451fcd8 deprecate @context annotation, temp fix for main.rs in ast, how should we handle this? 2021-01-26 11:21:05 -05:00
gluaxspeed
fe4a101d8d use infallible for cleaner type checking, clean up comments 2021-01-25 15:19:44 -05:00
gluaxspeed
29ff3c90b6 error and error message for deprecated test syntax, fmt, clean up 2021-01-25 15:12:10 -05:00
Protryon
ddfffd7c7b asg base implementation 2021-01-25 07:19:38 -08:00
collin
87bd041620 cargo +nightly clippy 2021-01-21 17:05:16 -05:00
collin
f9be039a7b remove unused grammar paths 2021-01-21 17:02:27 -05:00
collin
cd66497226 deprecate context annotation 2021-01-21 16:55:15 -05:00
gluaxspeed
c619d9e2bb @test no context, deprecate test keyword, cargofmt 2021-01-21 12:28:52 -05:00
gluaxspeed
1d4b30422a @test(...) style works for test + cargo fmt pass 2021-01-21 09:25:36 -05:00
collin
219f2360e5 rustup update && cargo clippy 2021-01-19 13:31:30 -05:00
Protryon
3c063d725f rename conditional expr to ternary 2021-01-14 05:27:31 -08:00
Protryon
91cac5f9d0 remove custom eq/hash implementations, add node implementations, remove range_or_expression 2020-12-21 05:58:10 -08:00
Protryon
d1276bd95d statement breakout 2020-12-16 15:00:45 -08:00
collin
1dbd72c453 Merge branch 'master' of github.com:AleoHQ/leo into expression-breakout 2020-12-16 13:46:43 -05:00
howardwu
babb8ec175 Hotfix cargo fmt 2020-12-14 13:54:46 -04:00
collin
00dac3709a Merge branch 'master' of github.com:AleoHQ/leo into fix/prefer-index-map 2020-12-08 16:07:49 -05:00
Protryon
f9dc75f70c expression breakout 2020-12-07 17:05:44 -08:00
collin
e93100eb6a merge master 2020-12-07 19:55:03 -05:00
collin
4cac0aeb41 merge master, update serialization test 2020-12-07 16:40:34 -05:00
Protryon
b9fb1123de block ast node 2020-12-07 13:28:03 -08:00
collin
5d2136b518 use index map in ast module 2020-12-07 12:05:55 -05:00
collin
3b23eb595a return iterator instead of vector 2020-12-07 11:22:45 -05:00
collin
f1bd5399a1 cargo clippy 2020-12-04 16:47:03 -05:00
collin
0698f5df59 Merge branch 'master' of github.com:AleoHQ/leo into feature/circuit-self-input 2020-12-04 16:41:31 -05:00
collin
4e9c2253fe fix failing clippy check 2020-12-02 12:36:50 -05:00
collin
d8c08fedd7 fix tests 2020-12-01 15:37:44 -05:00
collin
7977b20ad2 remove mut variable keyword 2020-12-01 10:19:02 -05:00
collin
82e13edbbe pass mutable reference to circuit variable when 'mut self' keyword is present 2020-12-01 10:12:50 -05:00
collin
74f7749462 pass circuit members into function by value when self keyword is present 2020-11-30 17:54:41 -05:00
collin
efe734afaf add input, self, mut self keyword functionality to ast module 2020-11-23 14:49:20 -05:00