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

os.path_separator

This commit is contained in:
Alexander Medvednikov 2019-10-12 22:18:19 +03:00
parent 9850193348
commit 81f8b26127
3 changed files with 5 additions and 3 deletions

View File

@ -518,9 +518,9 @@ fn (p mut Parser) const_decl() {
continue
}
mut name := p.check_name() // `Age = 20`
//if ! (name[0] >= `A` && name[0] <= `Z`) {
//p.error('const name must be capitalized')
//}
if p.mod != 'os' && contains_capital(name) {
//p.warn('const names cannot contain uppercase letters, use snake_case instead')
}
name = p.prepend_mod(name)
mut typ := ''
if p.is_vh {

View File

@ -5,6 +5,7 @@ module os
const (
PathSeparator = '/'
path_separator = '/'
)
fn init_os_args(argc int, argv &byteptr) []string {

View File

@ -5,6 +5,7 @@ module os
const (
PathSeparator = '\\'
path_separator = '\\'
)
// Ref - https://docs.microsoft.com/en-us/windows/desktop/winprog/windows-data-types