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

@ -168,7 +168,7 @@ fn (p mut Parser) scan_tokens() {
tok: res.tok
lit: res.lit
line_nr: p.scanner.line_nr
col: p.scanner.pos - p.scanner.last_nl_pos
col: p.scanner.pos - p.scanner.last_nl_pos
}
if res.tok == .eof {
break
@ -1487,6 +1487,7 @@ fn (p mut Parser) var_decl() {
mut names := []string
names << p.check_name()
p.scanner.validate_var_name(names[0])
for p.tok == .comma {
p.check(.comma)
names << p.check_name()