[lexer] Add Error::invalid_char constructor
This commit is contained in:
		
							parent
							
								
									469929fb8f
								
							
						
					
					
						commit
						b759ee4c57
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -14,5 +14,9 @@ impl Error { | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     pub fn invalid_char(c: char) -> Error { | ||||
|         Error::new(format!("invalid character: {}", c)) | ||||
|     } | ||||
| 
 | ||||
|     pub fn msg(&self) -> &str { &self.message } | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue