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

rename ModPath to v_modules_path; do not allow long variable names without _

This commit is contained in:
Alexander Medvednikov
2019-09-29 04:54:12 +03:00
parent 8b8cd13929
commit ee8ff39454
9 changed files with 61 additions and 48 deletions

View File

@@ -137,7 +137,7 @@ fn (p mut Parser) clear_vars() {
// vlib header file?
fn (p mut Parser) is_sig() bool {
return (p.pref.build_mode == .default_mode || p.pref.build_mode == .build_module) &&
(p.file_path.contains(ModPath))
(p.file_path.contains(v_modules_path))
}
// Function signatures are added to the top of the .c file in the first run.
@@ -1027,8 +1027,9 @@ fn (f &Fn) typ_str() string {
return sb.str()
}
// "fn foo(a int) stirng", for .vh module headers
fn (f &Fn) v_definition() string {
return 'todo'
return 'fn '//$f.name(${f.str_args()})'
}
// f.args => "int a, string b"