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

all: replace is_c, is_js with language

This commit is contained in:
spaceface777
2020-05-19 17:12:47 +02:00
committed by GitHub
parent 74686d0ec4
commit b10df252dc
14 changed files with 114 additions and 93 deletions

View File

@ -15,8 +15,7 @@ import vhelp
struct FormatOptions {
is_l bool
is_c bool
is_js bool
is_c bool // NB: This refers to the '-c' fmt flag, NOT the C backend
is_w bool
is_diff bool
is_verbose bool
@ -44,7 +43,6 @@ fn main() {
args := util.join_env_vflags_and_os_args()
foptions := FormatOptions{
is_c: '-c' in args
is_js: '-js' in args
is_l: '-l' in args
is_w: '-w' in args
is_diff: '-diff' in args
@ -197,7 +195,7 @@ fn (foptions &FormatOptions) post_process_file(file, formatted_file_path string)
return
}
is_formatted_different := fc != formatted_fc
if foptions.is_c || foptions.is_js {
if foptions.is_c {
if is_formatted_different {
eprintln('File is not formatted: $file')
exit(2)