mirror of
https://github.com/vlang/v.git
synced 2025-09-15 15:32:27 +03:00
v2: more parser fixes
This commit is contained in:
parent
457035c7ec
commit
1dd6491a2f
7 changed files with 131 additions and 77 deletions
|
@ -3207,6 +3207,8 @@ fn todo_remove() {
|
|||
|
||||
|
||||
fn (p mut Parser) check_if_parser_is_stuck(parsing_cycle u64, parsing_start_ticks i64){
|
||||
// QTODO
|
||||
/*
|
||||
if p.prev_stuck_token_idx == p.token_idx {
|
||||
// many many cycles have passed with no progress :-( ...
|
||||
eprintln('Parsing is [probably] stuck. Cycle: ${parsing_cycle:12ld} .')
|
||||
|
@ -3218,9 +3220,10 @@ fn (p mut Parser) check_if_parser_is_stuck(parsing_cycle u64, parsing_start_tick
|
|||
if time.ticks() > parsing_start_ticks + 30*1000{
|
||||
p.error('
|
||||
V took more than 30 seconds to compile this file.
|
||||
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose .
|
||||
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose
|
||||
')
|
||||
}
|
||||
}
|
||||
p.prev_stuck_token_idx = p.token_idx
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -65,9 +65,10 @@ pub fn new_v(pref &pref.Preferences) &V {
|
|||
|
||||
mut vgen_buf := strings.new_builder(1000)
|
||||
vgen_buf.writeln('module vgen\nimport strings')
|
||||
compiled_dir:=if os.is_dir(rdir) { rdir } else { filepath.dir(rdir) }
|
||||
|
||||
return &V{
|
||||
compiled_dir: if os.is_dir(rdir) { rdir } else { filepath.dir(rdir) }
|
||||
compiled_dir:compiled_dir// if os.is_dir(rdir) { rdir } else { filepath.dir(rdir) }
|
||||
table: new_table(pref.obfuscate)
|
||||
out_name_c: out_name_c
|
||||
cgen: new_cgen(out_name_c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue