scanner: fix special case - `e` or `E` at the end
							parent
							
								
									b17ade1257
								
							
						
					
					
						commit
						f859c7f93e
					
				| 
						 | 
				
			
			@ -223,9 +223,10 @@ fn (s mut Scanner) ident_dec_number() string {
 | 
			
		|||
	// scan exponential part
 | 
			
		||||
	mut has_exponential_part := false
 | 
			
		||||
	if s.expect('e', s.pos) || s.expect('E', s.pos) {
 | 
			
		||||
		exp_start_pos := (s.pos++)
 | 
			
		||||
		s.pos++
 | 
			
		||||
		exp_start_pos := s.pos
 | 
			
		||||
 | 
			
		||||
		if s.text[s.pos] in [`-`, `+`] {
 | 
			
		||||
		if s.pos < s.text.len && s.text[s.pos] in [`-`, `+`] {
 | 
			
		||||
			s.pos++
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -219,8 +219,9 @@ fn (s mut Scanner) ident_dec_number() string {
 | 
			
		|||
	// scan exponential part
 | 
			
		||||
	mut has_exponential_part := false
 | 
			
		||||
	if s.expect('e', s.pos) || s.expect('E', s.pos) {
 | 
			
		||||
		exp_start_pos := (s.pos++)
 | 
			
		||||
		if s.text[s.pos] in [`-`, `+`] {
 | 
			
		||||
		s.pos++
 | 
			
		||||
		exp_start_pos := s.pos
 | 
			
		||||
		if s.pos < s.text.len && s.text[s.pos] in [`-`, `+`] {
 | 
			
		||||
			s.pos++
 | 
			
		||||
		}
 | 
			
		||||
		for s.pos < s.text.len && s.text[s.pos].is_digit() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue