oridb / mc

Myrddin Compiler
MIT License
387 stars 34 forks source link

proposal: support '--' to pass CLI arguments to the program run by mbld -R #194

Closed typeless closed 4 years ago

typeless commented 4 years ago

I am trying to implement it.

oridb commented 4 years ago

Proposal sounds good -- there are two ways I can see to handle it. Right now, the -R option actually takes a list of files that compose a program. We can simply change that to one file, and make that into -R's option list. This means that you don't even need --, you can do mbld -R foo.myr arg list.

The other option will be finding some way to feed back the position of '--' in the arg list from the argument parser. Right now that information ls lost.

Either option is fine by me; I don't think I've ever passed multiple files to mbld -R.

typeless commented 4 years ago

@oridb Okay. I'll go with the first option.

typeless commented 4 years ago

The pr has been merged.