tests: add vlib/x/json2 to vtest-cleancode.v
							parent
							
								
									c939e4df97
								
							
						
					
					
						commit
						85e9cf1bd3
					
				|  | @ -11,7 +11,8 @@ const ( | ||||||
| 	vet_folders                     = [ | 	vet_folders                     = [ | ||||||
| 		'vlib/sqlite', | 		'vlib/sqlite', | ||||||
| 		'vlib/v', | 		'vlib/v', | ||||||
| 		'vlib/x/ttf/', | 		'vlib/x/json2', | ||||||
|  | 		'vlib/x/ttf', | ||||||
| 		'cmd/v', | 		'cmd/v', | ||||||
| 		'cmd/tools', | 		'cmd/tools', | ||||||
| 		'examples/2048', | 		'examples/2048', | ||||||
|  | @ -85,6 +86,7 @@ const ( | ||||||
| 		'vlib/strings/', | 		'vlib/strings/', | ||||||
| 		'vlib/time/', | 		'vlib/time/', | ||||||
| 		'vlib/vweb/', | 		'vlib/vweb/', | ||||||
|  | 		'vlib/x/json2', | ||||||
| 		'vlib/x/websocket/', | 		'vlib/x/websocket/', | ||||||
| 	] | 	] | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  | @ -151,7 +151,8 @@ fn (mut s Scanner) text_scan() Token { | ||||||
| 						if s.text[s.pos] == `"` { | 						if s.text[s.pos] == `"` { | ||||||
| 							break | 							break | ||||||
| 						} else if !s.text[s.pos].is_hex_digit() { | 						} else if !s.text[s.pos].is_hex_digit() { | ||||||
| 							return s.error('`${s.text[s.pos].ascii_str()}` is not a hex digit') | 							x := s.text[s.pos].ascii_str() | ||||||
|  | 							return s.error('`$x` is not a hex digit') | ||||||
| 						} | 						} | ||||||
| 						codepoint << s.text[s.pos] | 						codepoint << s.text[s.pos] | ||||||
| 					} | 					} | ||||||
|  | @ -241,9 +242,11 @@ fn (mut s Scanner) num_scan() Token { | ||||||
| // invalid_token returns an error token with the invalid token message.
 | // invalid_token returns an error token with the invalid token message.
 | ||||||
| fn (s Scanner) invalid_token() Token { | fn (s Scanner) invalid_token() Token { | ||||||
| 	if s.text[s.pos] >= 32 && s.text[s.pos] <= 126 { | 	if s.text[s.pos] >= 32 && s.text[s.pos] <= 126 { | ||||||
| 		return s.error('invalid token `${s.text[s.pos].ascii_str()}`') | 		x := s.text[s.pos].ascii_str() | ||||||
|  | 		return s.error('invalid token `$x`') | ||||||
| 	} else { | 	} else { | ||||||
| 		return s.error('invalid token ${s.text[s.pos].str_escaped()}') | 		x := s.text[s.pos].str_escaped() | ||||||
|  | 		return s.error('invalid token `$x`') | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue