Log line number if rule matched
Added function type() to cast.c