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

Only type identifiers for messages with overwritten OP #83

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions src/grammar/__snapshots__/grammar.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ Line 1, col 8:
"
`;

exports[`grammar should fail case-11 1`] = `
"<unknown>:1:14: Syntax error: expected "A".."Z"
Line 1, col 14:
> 1 | message(123) foo {
^
2 | signature: Slice;
"
`;

exports[`grammar should parse case-0 1`] = `
{
"entries": [
Expand Down
2 changes: 1 addition & 1 deletion src/grammar/grammar.ohm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Tact {
// Struct
Struct = "struct" typeLiteral "{" StructBody* "}" --originary
| "message" typeLiteral "{" StructBody* "}" --message
| "message" "(" integerLiteral ")" id "{" StructBody* "}" --messageWithId
| "message" "(" integerLiteral ")" typeLiteral "{" StructBody* "}" --messageWithId
StructBody = Field

// Contract
Expand Down
2 changes: 1 addition & 1 deletion src/grammar/grammar.ohm-bundle.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/grammar/test-failed/case-11.tact
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message(123) foo {
signature: Slice;
}