mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci: add a parser fuzzer step too (#7288)
This commit is contained in:
@@ -380,7 +380,7 @@ pub fn (mut p Parser) parse_generic_struct_inst_type(name string) table.Type {
|
||||
bs_cname += '_T_'
|
||||
mut generic_types := []table.Type{}
|
||||
mut is_instance := false
|
||||
for {
|
||||
for p.tok.kind != .eof {
|
||||
gt := p.parse_type()
|
||||
if !gt.has_flag(.generic) {
|
||||
is_instance = true
|
||||
|
||||
@@ -233,6 +233,9 @@ fn (mut s Scanner) ident_hex_number() string {
|
||||
mut first_wrong_digit_pos := 0
|
||||
mut first_wrong_digit := `\0`
|
||||
start_pos := s.pos
|
||||
if s.pos + 2 >= s.text.len {
|
||||
return '0x'
|
||||
}
|
||||
s.pos += 2 // skip '0x'
|
||||
if s.text[s.pos] == num_sep {
|
||||
s.error('separator `_` is only valid between digits in a numeric literal')
|
||||
|
||||
Reference in New Issue
Block a user