Skip to content

[PORT] Update Constant Expression ToString method #827

@tomlm

Description

@tomlm

Port this change from botbuilder-dotnet/master branch:
microsoft/botbuilder-dotnet#3500

Close #3498
The Expression ToString result should be re-parsed correct and have the same evaluate result as original expression.

For some reason, the expression ToString result may not be exactly the same as the original one. because:

  1. float/double format data. for example, 1.0 is a float/double, the stringify result is "1" or other formats, not the same with 1.0 maybe
  2. for the sequence operator, for example, add(1, 2, 3), the expression ToString result is :
    "1 && 2 && 3", if we construct with this string, we could get the new expression:
    "(1 && 2) && 3", because "&&" in the expression is a Binary operator. The two string results are not literally equal, but the meaning is the same.

Changed projects

  • AdaptiveExpressions
  • AdaptiveExpressions.Tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    R10Release 10 - August 17th, 2020

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions