chore(tvix/eval): print node representation for compiler errors
Better for development flow. Change-Id: I038efb39caca804f28a44fd4c83457e90abbcee4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6290 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
		
							parent
							
								
									1163ef3e41
								
							
						
					
					
						commit
						e4fadfaaf8
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -42,7 +42,11 @@ pub fn interpret(code: &str, location: Option<PathBuf>) -> EvalResult<Value> {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    for error in &result.errors {
 | 
			
		||||
        eprintln!("compiler error: {:?} at {:?}", error.kind, error.node,);
 | 
			
		||||
        eprintln!(
 | 
			
		||||
            "compiler error: {:?} at {:?}",
 | 
			
		||||
            error.kind,
 | 
			
		||||
            error.node.as_ref().map(|node| node.text())
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if let Some(err) = result.errors.last() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue