mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
js: add initial support for runes (#12077)
This commit is contained in:
parent
115493781b
commit
b2945e916f
10 changed files with 88 additions and 25 deletions
|
@ -1,6 +1,5 @@
|
|||
module builtin
|
||||
|
||||
import strings
|
||||
// used to generate JS throw statements.
|
||||
|
||||
pub fn js_throw(s any) {
|
||||
|
@ -71,15 +70,6 @@ pub fn unwrap(opt string) string {
|
|||
return res
|
||||
}
|
||||
|
||||
pub fn (r rune) str() string {
|
||||
res := ''
|
||||
mut sb := strings.new_builder(5)
|
||||
#res.str = r.valueOf().toString()
|
||||
sb.write_string(res)
|
||||
|
||||
return sb.str()
|
||||
}
|
||||
|
||||
fn js_stacktrace() string {
|
||||
stacktrace := ''
|
||||
#let err = new TypeError();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue