bolt/args.bend checks
raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/args.bend as Args
bolt/args: bolt's command line, read from IO.args(): bolt [lint]
[file..], bolt check file.., bolt lsp. A compiled Bend binary does pass
its arguments through, flags included; the runtime takes only its own out of
the line (--threads, --gpu, --gpu-build, --help), wherever they
stand, and -- hands even those to the program. A word that is not a
subcommand is a file, so bolt x.bend lints.
1 import
import Base
Definitions
def widen source · line 11 · raw
@ss:List<&1, String> -> List<&2, String>
the line at the quantity the rest of bolt reads it at (IO.args gives each argument once)
def is_command source · line 19 · raw
@+word:String -> Bool
a word that names a subcommand
def command source · line 23 · raw
@av:List<&2, String> -> String
the subcommand the line opens with; none, ""
def files source · line 31 · raw
@av:List<&2, String> -> List<&2, String>
the files: the line without the subcommand it opens with
def argv source · line 39 · raw
IO(List<&2, String>)
bolt's command line