diff --git a/vlib/v/parser/parser.v b/vlib/v/parser/parser.v index 8e4b372a0b6f1e..8484613e95e3b4 100644 --- a/vlib/v/parser/parser.v +++ b/vlib/v/parser/parser.v @@ -3536,6 +3536,7 @@ fn (mut p Parser) parse_concrete_types() []ast.Type { } // is_generic_name returns true if the current token is a generic name. +@[inline] fn (p &Parser) is_generic_name() bool { return p.tok.kind == .name && util.is_generic_type_name(p.tok.lit) } diff --git a/vlib/v/util/util.v b/vlib/v/util/util.v index 39482aac9fc7d6..59ed7bae5d72fd 100644 --- a/vlib/v/util/util.v +++ b/vlib/v/util/util.v @@ -572,14 +572,17 @@ pub fn ensure_modules_for_all_tools_are_installed(is_verbose bool) { } } +@[inline] pub fn strip_mod_name(name string) string { return name.all_after_last('.') } +@[inline] pub fn strip_main_name(name string) string { return name.replace('main.', '') } +@[inline] pub fn no_dots(s string) string { return s.replace('.', '__') }