fmt: process TypeOf node
							parent
							
								
									87a185ea9c
								
							
						
					
					
						commit
						4cde6c0865
					
				| 
						 | 
				
			
			@ -592,6 +592,11 @@ fn (f mut Fmt) expr(node ast.Expr) {
 | 
			
		|||
				f.write('}')
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		ast.TypeOf {
 | 
			
		||||
			f.write('typeof(')
 | 
			
		||||
			f.expr(it.expr)
 | 
			
		||||
			f.write(')')
 | 
			
		||||
		}
 | 
			
		||||
		else {
 | 
			
		||||
			eprintln('fmt expr: unhandled node ' + typeof(node))
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
fn test_typeof() {
 | 
			
		||||
	println(typeof(x))
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue