-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require comma separators (and nothing else) between struct members.
- Loading branch information
1 parent
0d2eb02
commit 04407e1
Showing
16 changed files
with
68 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
namespace: Parse | ||
expectation: Fail | ||
outputs: | ||
- "Error [EPAR0370041]: Each member declaration in a struct or record must be followed by a comma (except the last).\n --> test:5:9\n |\n 5 | y: u8\n | ^" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
namespace: Parse | ||
expectation: Fail | ||
outputs: | ||
- "Error [EPAR0370041]: Each member declaration in a struct or record must be followed by a comma (except the last).\n --> test:4:14\n |\n 4 | x: u8;\n | ^\nError [EPAR0370009]: unexpected string: expected 'identifier', found ';'\n --> test:4:14\n |\n 4 | x: u8;\n | ^" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ expectation: Pass | |
|
||
program test.aleo { | ||
struct Foo { | ||
a: u8; | ||
a: u8, | ||
} | ||
|
||
record Token { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,6 @@ program test.aleo { | |
} | ||
|
||
struct bar { | ||
a: u64; | ||
a: u64, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ expectation: Fail | |
|
||
program test.aleo { | ||
struct Foo { | ||
x: u32; | ||
x: u32, | ||
} | ||
|
||
function main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ expectation: Fail | |
|
||
program test.aleo { | ||
struct Foo { | ||
x: u8; | ||
x: u8, | ||
} | ||
|
||
function main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ expectation: Fail | |
|
||
program test.aleo { | ||
struct Foo { | ||
x: u32; | ||
x: u32, | ||
} | ||
|
||
function main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ expectation: Fail | |
|
||
program test.aleo { | ||
struct Foo { | ||
x: u8; | ||
x: u8, | ||
} | ||
|
||
function Foo() {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
namespace: Parse | ||
expectation: Fail | ||
*/ | ||
program comma_separators.aleo { | ||
struct none { | ||
x: u8 | ||
y: u8 | ||
} | ||
|
||
transition main(public a: u32) -> u32 { | ||
return a; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
namespace: Parse | ||
expectation: Fail | ||
*/ | ||
program only_comma_separators.aleo { | ||
struct semicolons { | ||
x: u8; | ||
y: u8 | ||
} | ||
|
||
struct semicolons_with_trailing { | ||
x: u8; | ||
y: u8; | ||
} | ||
|
||
transition main(public a: u32) -> u32 { | ||
return a; | ||
} | ||
} |