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

v.gen.js: refactor code, fix alias codegen, -stats now again works with tests on the JS backend (#11512)

This commit is contained in:
playX
2021-09-16 14:00:15 +03:00
committed by GitHub
parent ead5e66afd
commit c175b4fd48
7 changed files with 214 additions and 386 deletions

View File

@@ -2,6 +2,7 @@ module os
#const $fs = require('fs');
#const $path = require('path');
#const tty = require('tty')
pub const (
path_delimiter = '/'
@@ -95,3 +96,10 @@ pub fn execute(cmd string) Result {
output: stdout
}
}
pub fn is_atty(fd int) int {
res := 0
#res.val = +tty.isatty(fd.val)
return res
}