ncatelli / spasm

An experimental multi-target assembler.
Apache License 2.0
4 stars 0 forks source link

Empty spasm assemble command now returns a helpstring #82

Closed ncatelli closed 4 years ago

ncatelli commented 4 years ago

Introduction

This PR updates the spasm assemble command to now output a helpstring on invalid args. Ideally this code will be cleaned up further by adding these helpstring fields to scrap.

vscode ➜ /workspaces/spasm (bugfix/81/assemble-command-error) $ ./target/debug/spasm assemble
Usage: assemble [OPTIONS]
assemble a source file into its corresponding binary format

Flags:
    --help, -h          print help string
    --in-file, -i       an asm source filepath to assemble
    --out-file, -o      an output path for the corresponding binary file
    --backend, -b       specify the target backend to assemble
vscode ➜ /workspaces/spasm (bugfix/81/assemble-command-error) $ echo $?
1
vscode ➜ /workspaces/spasm (bugfix/81/assemble-command-error) $ ./target/debug/spasm assemble -h
Usage: assemble [OPTIONS]
assemble a source file into its corresponding binary format

Flags:
    --help, -h          print help string
    --in-file, -i       an asm source filepath to assemble
    --out-file, -o      an output path for the corresponding binary file
    --backend, -b       specify the target backend to assemble
vscode ➜ /workspaces/spasm (bugfix/81/assemble-command-error) $ echo $?
0

Linked Issues

resolves #81

Dependencies

Test

Review

Deployment