public bool EndsWith <T>() where T : Statement { return(!IsEmpty && (Statements.EndsWith <T>() || (LastStatement is Block && ((Block)LastStatement).EndsWith <T>()))); }