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

use ToString for formatting in Evaluation #1377

Closed
wants to merge 5 commits into from
Closed

Conversation

mmatera
Copy link
Contributor

@mmatera mmatera commented May 16, 2021

In the same direction as PR #1376, this PR starts to decouple formatting routines from the mathics core.

  • evaluation.format implements formatting by applying ToString[HoldForm[], format] to the result.
  • doctest now parses strings in a way that we can use "[charname]" inside the expected results.

The idea is that, at the end, every conversion be consistent with the output of ToString.

@mmatera mmatera force-pushed the boxesto-refactory branch from 793279a to 51e1ee9 Compare May 17, 2021 02:47
@rocky rocky force-pushed the master branch 2 times, most recently from b007e8c to ef16eb6 Compare May 19, 2021 22:40
@rocky rocky force-pushed the master branch 5 times, most recently from 8367d69 to 83bb068 Compare June 7, 2021 21:01
@rocky rocky force-pushed the master branch 2 times, most recently from 9570fdd to 499f1bf Compare June 26, 2021 14:12
@TiagoCavalcante
Copy link
Contributor

TiagoCavalcante commented Nov 10, 2021

@mmatera what is the status of this?

@mmatera
Copy link
Contributor Author

mmatera commented Nov 10, 2021

This was also a try to reorganize the way in which formatting is done. The whole question was If the code for formatting (spread into Evaluation.evaluate, BaseExpression.format, BaseExpresion.do_format, and BaseExpression.boxes_to_... ) and the code in ToString should be shared, or if they are different things. I think now we have taken a different direction, so this is outdated

@mmatera mmatera closed this Nov 10, 2021
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

Successfully merging this pull request may close these issues.

2 participants