Skip to content

use ToString for formatting in Evaluation - #1377

Closed
mmatera wants to merge 5 commits into
masterfrom
boxesto-refactory
Closed

use ToString for formatting in Evaluation#1377
mmatera wants to merge 5 commits into
masterfrom
boxesto-refactory

Conversation

@mmatera

@mmaterammatera commented May 16, 2021

Copy link
Copy Markdown
Contributor

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
mmateraforce-pushed the boxesto-refactory branch from 793279a to 51e1ee9CompareMay 17, 2021 02:47
@rocky
rockyforce-pushed the master branch 2 times, most recently from b007e8c to ef16eb6CompareMay 19, 2021 22:40
@rocky
rockyforce-pushed the master branch 5 times, most recently from 8367d69 to 83bb068CompareJune 7, 2021 21:01
@rocky
rockyforce-pushed the master branch 2 times, most recently from 9570fdd to 499f1bfCompareJune 26, 2021 14:12
@rockyrocky mentioned this pull request Jun 30, 2021
@TiagoCavalcante

TiagoCavalcante commented Nov 10, 2021

Copy link
Copy Markdown
Contributor

@mmatera what is the status of this?

@mmatera

mmatera commented Nov 10, 2021

Copy link
Copy Markdown
ContributorAuthor

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

@mmaterammatera closed this Nov 10, 2021
Sign up for freeto 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

@mmatera@TiagoCavalcante