Hey Luke,
The input code is the entire code :
So in this case input code is : "foo(a,\nb)"

Hence it checks at the end of this string and adds the semi colon.