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

module cache fixes; do not allow function names starting with _

This commit is contained in:
Alexander Medvednikov
2019-10-09 23:38:33 +03:00
parent 0796e1dd69
commit 2411b8d1e7
18 changed files with 95 additions and 42 deletions

View File

@@ -4,11 +4,11 @@
module term
fn _format(msg, open, close string) string {
pub fn format(msg, open, close string) string {
return '\x1b[' + open + 'm' + msg + '\x1b[' + close + 'm'
}
fn _format_rgb(r, g, b int, msg, open, close string) string {
pub fn format_rgb(r, g, b int, msg, open, close string) string {
return '\x1b[' + open + ';2;' + r.str() + ';' + g.str() + ';' + b.str() + 'm' + msg + '\x1b[' + close + 'm'
}

View File

@@ -4,10 +4,3 @@
module term
pub fn format(msg, open, close string) string {
return _format(msg, open, close)
}
pub fn format_rgb(r, g, b int, msg, open, close string) string {
return _format_rgb(r, g, b, msg, open, close)
}

View File

@@ -4,10 +4,3 @@
module term
pub fn format(msg, open, close string) string {
return _format(msg, open, close)
}
pub fn format_rgb(r, g, b int, msg, open, close string) string {
return _format_rgb(r, g, b, msg, open, close)
}