axon_parser

Crates.ioaxon_parser
lib.rsaxon_parser
version0.8.2
sourcesrc
created_at2020-12-23 06:31:44.887025
updated_at2021-10-04 22:58:50.968483
descriptionParses a representation of SkySpark's Axon language into an AST
homepagehttps://github.com/a-mackay/axon_parser
repositoryhttps://github.com/a-mackay/axon_parser
max_upload_size
id326400
size215,637
... (a-mackay)

documentation

README

Axon Parser

Parses the output of SkySpark's toAxonCode(parseAst( ... )) into an abstract syntax tree.

Features

  • Parse an AST representing a Axon func.
  • Code formatting

Code Formatting

The code formatting is basic and opinionated, and strays from idiomatic Axon code to keep the implementation relatively simple. The configuration is currently limited to the type and size of indentation used.

For example, Axon like:

( param1  ,param2:"arg2")=>"hello world"

will become:

(param1, param2: "arg2") => do
  "hello world"
end

It may not produce the prettiest Axon code, plus the formatted output has not been extensively tested for correctness.

Getting Started

See the documentation for the parse_func and parse_func_to_formatted_lines functions.

Commit count: 156

cargo fmt