1
1
mirror of https://github.com/github/semantic.git synced 2024-11-22 14:20:24 +03:00

Update the references.

This commit is contained in:
Rob Rix 2020-02-04 14:28:34 -05:00
parent 223fd96fdb
commit a9485a0d0f
No known key found for this signature in database
GPG Key ID: 2BE643E01DC032AE

View File

@ -1,25 +1,25 @@
# semantic-ast
# semantic-parse
This package provides a command line tool that will output ASTs in supported formats.
#### CLI
To output ASTs, run the `semantic-ast` command, specifying two mandatory options: 1) the format you'd like to return (ex., `Show`, `JSON`, etc.) and 2) the option specifying whether the source code will be passed in directly via command line (using `--sourceString`) or via providing the file path `--sourceFile`.
To output ASTs, run the `semantic-parse` command, specifying two mandatory options: 1) the format you'd like to return (ex., `Show`, `JSON`, etc.) and 2) the option specifying whether the source code will be passed in directly via command line (using `--sourceString`) or via providing the file path `--sourceFile`.
Filepath:
```
semantic-ast --format [FORMAT] --sourceFile [FILEPATH]
semantic-parse --format [FORMAT] --sourceFile [FILEPATH]
```
Source string:
```
semantic-ast --format [FORMAT] --sourceString [SOURCE]
semantic-parse --format [FORMAT] --sourceString [SOURCE]
```
An example command is:
```
semantic-ast -- --format Show --sourceString "a"
semantic-parse -- --format Show --sourceString "a"
```
This will generate an AST