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

For some expression the AST 'build' function work fail. #1094

Closed
sadofriod opened this issue Nov 19, 2023 · 3 comments · Fixed by #1098
Closed

For some expression the AST 'build' function work fail. #1094

sadofriod opened this issue Nov 19, 2023 · 3 comments · Fixed by #1098
Labels

Comments

@sadofriod
Copy link

I tried to add a unit test in test/shared.js.
Example:

      it('!', () => {
        const expected = {
          type: 'callExpression',
          id: 'not',
          arguments: [
            { type: 'identifier', name: 'Second' },
          ],
        };
        expect(handler("IF(var_AMAName1 != '' && !Waived1, 'Total BSTF - ' + TEXT(AMA1_BSTF), IF(!Waived1, 'Waived', ''))")).to.deep.equal(expected);
      });

Then I got the following print

{
    "errorType": "SyntaxError"
    "message": "Syntax error."
    "type": "error"
}
@sadofriod
Copy link
Author

When I input the
IF(!Waived1 != '' && var_AMAName1, 'Total BSTF - ' + TEXT(AMA1_BSTF), IF(!Waived1, 'Waived', '')), the build function is working.

@leifg
Copy link
Owner

leifg commented Dec 1, 2023

Sorry for the delay, was pretty busy. This seems to be an issue with the parser. I confirmed it's not a Syntax error anymore.

Can you test on the branch for PR #1098?

Copy link

github-actions bot commented Dec 9, 2023

🎉 This issue has been resolved in version 6.25.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants