mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.scanner: use internally_generated_v_code
instead of internal_memory
to describe generated code buffers
This commit is contained in:
parent
44ed42ce06
commit
5ecbfb7bf1
@ -129,6 +129,8 @@ pub fn new_scanner_file(file_path string, comments_mode CommentsMode, pref_ &pre
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const internally_generated_v_code = 'internally_generated_v_code'
|
||||||
|
|
||||||
// new scanner from string.
|
// new scanner from string.
|
||||||
pub fn new_scanner(text string, comments_mode CommentsMode, pref_ &pref.Preferences) &Scanner {
|
pub fn new_scanner(text string, comments_mode CommentsMode, pref_ &pref.Preferences) &Scanner {
|
||||||
mut s := &Scanner{
|
mut s := &Scanner{
|
||||||
@ -140,8 +142,8 @@ pub fn new_scanner(text string, comments_mode CommentsMode, pref_ &pref.Preferen
|
|||||||
is_print_rel_paths_on_error: true
|
is_print_rel_paths_on_error: true
|
||||||
is_fmt: pref_.is_fmt
|
is_fmt: pref_.is_fmt
|
||||||
comments_mode: comments_mode
|
comments_mode: comments_mode
|
||||||
file_path: 'internal_memory'
|
file_path: scanner.internally_generated_v_code
|
||||||
file_base: 'internal_memory'
|
file_base: scanner.internally_generated_v_code
|
||||||
}
|
}
|
||||||
s.scan_all_tokens_in_buffer()
|
s.scan_all_tokens_in_buffer()
|
||||||
return s
|
return s
|
||||||
|
Loading…
Reference in New Issue
Block a user