• CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      4 hours ago

      Losing formatting other than what you’ve set in your deparser would be the point. Losing comments would be bad, but that seems easily fixable just by giving each comment block a symbol that points to it’s contents.

      • djehuti@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        54 minutes ago

        Or by including comments in the parse tree. (& Yes, it is done various places for various languages and formats.)