mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
js: os
now compiles to the JS backend, more builtins & minor codegen fixes (#11302)
This commit is contained in:
parent
f257a23313
commit
109d5d5847
15 changed files with 479 additions and 369 deletions
|
@ -2,7 +2,15 @@ module builtin
|
|||
|
||||
pub fn (b byte) is_space() bool {
|
||||
mut result := false
|
||||
#result = /^\s*$/.test(String.fromCharCode(b))
|
||||
#result.val = /^\s*$/.test(String.fromCharCode(b))
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
pub fn (c byte) is_letter() bool {
|
||||
result := false
|
||||
|
||||
#result.val = (c.val >= `a`.charCodeAt() && c.val <= `z`.charCodeAt()) || (c.val >= `A`.charCodeAt() && c.val <= `Z`.charCodeAt())
|
||||
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue