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

Added the ability to dump the token stream or ast in bin. #278

Merged
merged 8 commits into from
Mar 25, 2020

Commits on Mar 17, 2020

  1. Added the ability to dump the token stream or ast in bin.

    The dump functionality works both for files and REPL.
    
    With --dump-tokens or -t for short it dumps the token stream to stdout  and --dump-ast or -a for short to dump the ast to stdout.
    
    The dumping of tokens and ast is mutually exclusive. and when dumping it wont run the code.
    HalidOdat committed Mar 17, 2020
    Configuration menu
    Copy the full SHA
    533726f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ab83d6b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1ca6c26 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2020

  1. Added a dynamic multi-format dumping of token stream and ast in bin.

    - Changed the --dump-tokens and --dump-ast to be an optional argument that optionally takes a value of format type ([--opt=[val]]).
    - The default format for --dump-tokens and --dump-ast is Debug format which calls std::fmt::Debug.
    - Added Json and JsonMinified format for both dumps,  use serde_json internally.
    - It is easy to support other format types, such as Toml with toml-rs for example.
    HalidOdat committed Mar 18, 2020
    Configuration menu
    Copy the full SHA
    84d4105 View commit details
    Browse the repository at this point in the history
  2. Made serde an optional dependency.

    - Serde serialization and deserialization can be switched on by using the feature flag "serde-ast".
    HalidOdat committed Mar 18, 2020
    Configuration menu
    Copy the full SHA
    8a34176 View commit details
    Browse the repository at this point in the history
  3. Changed the JSON dumping format.

    - Now Json  dumping format prints the data in minefied JSON form by default.
    - Removed JsonMinified.
    - Added JsonPretty as a way to dump the data in pretty printed JSON format.
    HalidOdat committed Mar 18, 2020
    Configuration menu
    Copy the full SHA
    96c74ae View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2020

  1. Updated the docs.

    HalidOdat committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    019f9bd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    67231e0 View commit details
    Browse the repository at this point in the history