mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
jsgen: implement js backend
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
struct FormatOptions {
|
||||
is_l bool
|
||||
is_c bool
|
||||
is_js bool
|
||||
is_w bool
|
||||
is_diff bool
|
||||
is_verbose bool
|
||||
@@ -51,6 +52,7 @@ 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
|
||||
@@ -200,7 +202,7 @@ fn (foptions &FormatOptions) post_process_file(file string, formatted_file_path
|
||||
return
|
||||
}
|
||||
is_formatted_different := fc != formatted_fc
|
||||
if foptions.is_c {
|
||||
if foptions.is_c || foptions.is_js {
|
||||
if is_formatted_different {
|
||||
eprintln('File is not formatted: $file')
|
||||
exit(2)
|
||||
|
||||
Reference in New Issue
Block a user