1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

15 Commits

Author SHA1 Message Date
yuyi
e6a679b019
flag: octal format 2020-03-20 20:21:16 +01:00
yuyi
9ef8499183
flag: unify apis 2020-03-19 07:06:37 +01:00
Alexander Medvednikov
7a92a47eb3
flag: fix array boundary check 2020-03-06 02:02:32 +01:00
Delyan Angelov
c1cc203c17 tools: bugfixes and new features for oldv and performance_compare 2020-01-08 21:45:47 +01:00
Delyan Angelov
67f397f888 os: implement os.cachedir() . Use it inside os.tmpdir() too 2020-01-03 19:46:23 +01:00
Delyan Angelov
d2f2ac523f flag: fix displaying of both abbreviated and long options
Add tests for the usage screen
2019-12-30 16:38:32 +01:00
radare
49430a5c31 flag help message is now a bit more compact 2019-12-30 05:21:22 +01:00
lutherwenxu
dadf147382 flag: implement *_opt() and *_multi()
It's very often that someone will need to process values that were not
provided separately (eg. generating a complex default value like in V).

This commit allows the user to call the *_opt() functions instead of
forcing them to provide some magical default values.

* flag: Implement int_multi(), float_multi() and string_multi()

These 3 functions are useful when the application expects a flag to be
repeated more than once.

A sample would be:
v -cflags someflag -cflags secondflag

This feature exposes the raw array that the flag parser internally keeps
and allow the application to parse it however they want instead of
dropping everything except the first element.

* flag: Add documentation

Add comments describing what *_opt() and *_multi() do.
2019-12-16 19:03:38 +03:00
Delyan Angelov
ec15bfb7d1 v test v => v test-compiler 2019-12-01 12:50:13 +03:00
joe-conigliaro
59378dce46 compiler/vlib: replace substr/left/right with [start..end] everywhere 2019-10-27 10:03:15 +03:00
Delyan Angelov
366c50674c tooling: add tools/compare_v_performance_between_commits
easily compare v performance/size across commits.

* fix eprintln on linux (it now uses stderr, and flushes it).

* flag: cleaner usage information.
2019-09-28 14:17:16 +03:00
Vitor Oliveira
1a099c9284 vlib: fix several typos 2019-09-14 23:54:14 +03:00
Marco Böttcher
c924a6cf00 flag: allow to define flags with abbreviation
* flag: allow to check the count of the free args to produce an error

* flag: allow to define flags with abbreviation

flags could be defined to use a single char as abbreviation like
'--output' or '-o'
'--help' or '-h'
2019-08-07 16:52:10 +02:00
Marco Böttcher
ff730b4eb0 flag: allow to check the count of the free args to produce an error 2019-08-06 01:56:42 +02:00
Marco Böttcher
cb9fb66ccf flag: added a simple command line parser 2019-07-12 15:47:27 +02:00