1. 03 Jul, 2020 1 commit
  2. 15 Aug, 2019 2 commits
  3. 27 Jul, 2019 1 commit
  4. 07 Aug, 2018 1 commit
  5. 17 Jul, 2018 1 commit
  6. 18 Apr, 2018 2 commits
  7. 26 Sep, 2017 4 commits
  8. 21 Sep, 2017 1 commit
  9. 19 Sep, 2017 3 commits
  10. 18 Sep, 2017 3 commits
    • Tommy Yu's avatar
      Multiple sources example in the documentation · 3f4ffbf5
      Tommy Yu authored
      3f4ffbf5
    • Tommy Yu's avatar
      Updating README with a working stream example · 8c91c819
      Tommy Yu authored
      - Show that read/write streams work as advertised.
      8c91c819
    • Tommy Yu's avatar
      Comprehensive handling of Node.sourcepath · 7824fa68
      Tommy Yu authored
      This required very substantial changes, some of which were cleanups that
      were done on one stab included with this one, namely:
      
      - Refactored the sourcemap.write function, the return value matches what
        documentation for the class said (mapping before names).
      - Reordered the arguments for that, too - normalize is now the first
        keyword argument (should really be all keywords, but due to support
        for Python 2, this cannot be specified).
      
      Now that write function and the walk function that feeds into it can be
      both corrected in one go:
      
      - Introduce a new ruletype for the final stream output - StreamFragment.
        This is a 5-tuple that includes the source, which will now be derived
        using the sourcepath attributes of input Nodes.
      - However, in the interest of flexibility and not clobber the original
        logic completely, the unparser walk function now support a couple
        additional arguments, namely the conversion function which defaults to
        converting the TextChunk (formerly SourceChunk) type into the desired
        StreamFragment type so the source can be tracked.
      - The other is a decorator function for the inner walk function which
        defaults to an implementation that will track the stack of Nodes that
        have sourcepath assigned, so that the source lookup can be done by
        checking the most recently pushed value without having to backtracked
        to its parent node for that value.  Not that parent references are
        available, however.
      - This also allow the use of an identity function for both these
        arguments to return the walk function to produce the chunks without
        the source handling.  Alternatively provide a way to simply produce
        the text output only.  This is tested by the test_es5_walker module
        so that the SimpleChunk would not be turned into the StreamFragment
        which relies on attributes that it doesn't provide.
      - To minimize disruption of existing tests, the test that checks the
        raw output of the Unparser, which is produced through the walk
        function, mostly will turn that back into a 4-tuple for checking
        against the existing values.
      - Finally, for cases where nodes do not provide sourcepath, and given
        that the sourcemap requires a path (or url?) for the source, the
        about:invalid will be used (RFC6694, and the iana about-uri-tokens
        registry) to satisfy that value.
      7824fa68
  11. 05 Sep, 2017 2 commits
    • Tommy Yu's avatar
      Round 2, bring options for rules into rules module · 15bddf6c
      Tommy Yu authored
      - Bring all the rule related setup functions into the core or rules
        module, where applicable.
      - Formalize all rules constructor to become a callable, even though they
        may not have options, this makes invocation/usage consistent for end-
        users (even though the underlying classes point directly to the
        handlers themselves in the handlers.core module.
      15bddf6c
    • Tommy Yu's avatar
      Renaming all the things. · 813230dc
      Tommy Yu authored
      - Group all the layout handler related things into their own submodule,
      - It's like how the parsers need lexers, unparsers need handlers.
      - Indentator should be in its own module, like the Obfuscator; also
        the obfuscator module is renamed to obfuscation.
      - Names should now better reflect the intended purposes.
      813230dc
  12. 04 Sep, 2017 6 commits
  13. 29 Aug, 2017 1 commit
  14. 26 Aug, 2017 3 commits
  15. 09 Jun, 2017 1 commit
  16. 08 Jun, 2017 2 commits
  17. 06 Jun, 2017 1 commit
  18. 01 Jun, 2017 1 commit