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

[Merged by Bors] - Update README.md cli options #2678

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rust-version = "1.66"
authors = ["boa-dev"]
repository = "https://github.com/boa-dev/boa"
license = "Unlicense/MIT"
description = "Boa is a Javascript lexer, parser and Just-in-Time compiler written in Rust. Currently, it has support for some of the language."
description = "Boa is a Javascript lexer, parser and compiler written in Rust. Currently, it has support for some of the language."

[workspace.dependencies]
boa_engine = { version = "0.16.0", path = "boa_engine" }
Expand Down
45 changes: 35 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,44 @@ then go to `http://localhost:8080`.
## Command-line Options

```shell
USAGE:
boa [OPTIONS] [FILE]...
Usage: boa [OPTIONS] [FILE]...

FLAGS:
-h, --help Prints help information
-V, --version Prints version information
Arguments:
[FILE]...
The JavaScript file(s) to be evaluated

OPTIONS:
-a, --dump-ast <FORMAT> Dump the abstract syntax tree (ast) to stdout with the given format [possible values: Debug, Json,
JsonPretty]
Options:
-a, --dump-ast [<FORMAT>]
Dump the AST to stdout with the given format

ARGS:
<FILE>... The JavaScript file(s) to be evaluated
Possible values:
- debug: The different types of format available for dumping
- json
- json-pretty

-t, --trace
Dump the AST to stdout with the given format

--vi
Use vi mode in the REPL

--flowgraph [<FORMAT>]
Generate instruction flowgraph. Default is Graphviz

Possible values:
- graphviz: Generates in graphviz format: <https://graphviz.org/>
- mermaid: Generates in mermaid format: <https://mermaid-js.github.io/mermaid/>

--flowgraph-direction <FORMAT>
Specifies the direction of the flowgraph. Default is TopToBottom

[possible values: top-to-bottom, bottom-to-top, left-to-right, right-to-left]

-h, --help
Print help (see a summary with '-h')

-V, --version
Print version
```

## Roadmap
Expand Down
8 changes: 2 additions & 6 deletions boa_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,9 @@ enum DumpFormat {
/// Represents the format of the instruction flowgraph.
#[derive(Debug, Clone, Copy, ValueEnum)]
enum FlowgraphFormat {
/// Generates in [graphviz][graphviz] format.
///
/// [graphviz]: https://graphviz.org/
/// Generates in graphviz format: <https://graphviz.org/>.
Graphviz,
/// Generates in [mermaid][mermaid] format.
///
/// [mermaid]: https://mermaid-js.github.io/mermaid/#/
/// Generates in mermaid format: <https://mermaid-js.github.io/mermaid/>.
Mermaid,
}

Expand Down