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 grammar tests for handling + + and - - operations #1351

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

xpyctumo
Copy link
Contributor

@xpyctumo xpyctumo commented Jan 16, 2025

Issue

Closes #1267

Checklist

  • I have updated CHANGELOG.md
  • I have run all the tests locally and no test failure was reported
  • I have run the linter, formatter and spellchecker
  • I did not do unrelated and/or undiscussed refactorings

@xpyctumo xpyctumo added kind: testing Tests (*.spec.ts) scope: parser Implementation of parser (src/grammar) labels Jan 16, 2025
@xpyctumo xpyctumo added this to the Doc: 2025-01 milestone Jan 16, 2025
@xpyctumo xpyctumo requested a review from a team as a code owner January 16, 2025 12:00
@xpyctumo
Copy link
Contributor Author

<unknown>:2:28: Expected not "-"

    Line 2, col 28:
      1 | contract Foo {
    > 2 |     a: Int as coins = 123 - -456;
                                     ^
      3 |     b: Int as coins = 123 + -456;

      18 |         // eslint-disable-next-line @typescript-eslint/no-explicit-any
      19 |         const message = `Expected ${(matchResult as any).getExpectedText()}\n`;
    > 20 |         throw new TactCompilationError(display.at(source, message), source);
         |               ^
      21 |     },
      22 | });

The old parser will return this error.
Is it possible for us to somehow separate the new/old parser and tests now?

@xpyctumo
Copy link
Contributor Author

Is it possible for us to somehow separate the new/old parser and tests now?

Tests moved to src/grammar/next/test directory. They will only run using the new parser

@anton-trunov anton-trunov merged commit c0a3a5a into main Jan 21, 2025
16 of 17 checks passed
@anton-trunov anton-trunov deleted the grammar-operator-tests branch January 21, 2025 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: testing Tests (*.spec.ts) scope: parser Implementation of parser (src/grammar)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add grammar tests with + + and - -
4 participants