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

Nested simple_expression objects are not parsed #247

Open
AntoineGautier opened this issue Sep 10, 2024 · 0 comments
Open

Nested simple_expression objects are not parsed #247

AntoineGautier opened this issue Sep 10, 2024 · 0 comments

Comments

@AntoineGautier
Copy link
Contributor

AntoineGautier commented Sep 10, 2024

I am opening this issue for reference. It comes from a chat discussion with @JayHuLBL.

Nested function calls are not parsed into funArgsObjExp objects but are simply returned as strings as below.

Case of a function call nested into another function call:

{
    "name": "max",
    "arguments": [
      {
        "name": "{sum({(if [object Object] then 1 else 0) for j in 1:nEqu}) for i in 1:nSta}"
      }
    ]
  }

Case of a function call nested into a string expression:

  "expression": {
    "simple_expression": "capCoo_nominal/abs(TChiWatSup_nominal -TChiWatRet_nominal)/ctl.cp_default/ctl.rho_default"
  }

The same issue is observed with nested ifExpressionObj objects, and is likely common to all simple_expression objects.

  "expression": {
    "simple_expression": "(THeaWatRet_nominal -THeaWatSup_nominal)*(if ctl.have_hrc then 0.5 else 1)"
  }
@AntoineGautier AntoineGautier changed the title Nested function calls are not parsed Nested simple_expression objects are not parsed Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant