diff --git a/Cargo.toml b/Cargo.toml index 8813a8237c3..0af692a1c1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/README.md b/README.md index 89097380fe3..3ae24be2a0e 100644 --- a/README.md +++ b/README.md @@ -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 Dump the abstract syntax tree (ast) to stdout with the given format [possible values: Debug, Json, - JsonPretty] +Options: + -a, --dump-ast [] + Dump the AST to stdout with the given format -ARGS: - ... 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 [] + Generate instruction flowgraph. Default is Graphviz + + Possible values: + - graphviz: Generates in graphviz format: + - mermaid: Generates in mermaid format: + + --flowgraph-direction + 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 diff --git a/boa_cli/src/main.rs b/boa_cli/src/main.rs index bb5fb9bc914..b36c6d28c0c 100644 --- a/boa_cli/src/main.rs +++ b/boa_cli/src/main.rs @@ -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: . Graphviz, - /// Generates in [mermaid][mermaid] format. - /// - /// [mermaid]: https://mermaid-js.github.io/mermaid/#/ + /// Generates in mermaid format: . Mermaid, }