2023-09-09 00:34:08 +00:00
|
|
|
# THP: Typed Hypertext Processor
|
|
|
|
|
|
|
|
Types and a new syntax for PHP, because I'm forced to use it at work.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2024-03-18 21:40:22 +00:00
|
|
|
TBD.
|
2023-09-09 00:34:08 +00:00
|
|
|
|
2024-03-18 21:40:22 +00:00
|
|
|
Requirements: A *nix system & cargo
|
2023-09-09 00:34:08 +00:00
|
|
|
|
2024-03-18 21:40:22 +00:00
|
|
|
```sh
|
|
|
|
# Clone the repo
|
|
|
|
git clone https://github.com/Araozu/thp-lang.git
|
2023-09-09 00:34:08 +00:00
|
|
|
|
2024-03-18 21:40:22 +00:00
|
|
|
# Generate an executable
|
|
|
|
cargo build --release
|
2023-09-09 00:34:08 +00:00
|
|
|
|
2024-03-18 21:40:22 +00:00
|
|
|
# The executable will be located in ./target/release/thp
|
2023-09-09 00:34:08 +00:00
|
|
|
|
2024-03-18 21:40:22 +00:00
|
|
|
# And then run it follow the instructions!
|
|
|
|
```
|
2023-09-09 00:34:08 +00:00
|
|
|
|
2024-03-18 21:40:22 +00:00
|
|
|
```sh
|
|
|
|
Usage: `thp [command] [options]`
|
2023-09-09 00:34:08 +00:00
|
|
|
|
2024-03-18 21:40:22 +00:00
|
|
|
Commands
|
|
|
|
|
|
|
|
c _file_ Compiles _file_ in-place
|
|
|
|
f _file_ Formats _file_
|
|
|
|
r Starts the REPL
|
|
|
|
|
|
|
|
init Initializes a new project in the current directory
|
|
|
|
build Builds the project
|
|
|
|
fmt Formats all files in the project
|
|
|
|
watch, w Starts compilation of the project in watch mode
|
|
|
|
|
|
|
|
help, h Print this message & exit
|
|
|
|
|
|
|
|
General options
|
|
|
|
|
|
|
|
-h, --help Print command-specific usage
|
|
|
|
-v, --version Print version & exit
|
|
|
|
```
|
2023-09-09 00:34:08 +00:00
|
|
|
|