The invention belongs to the technical field of medicine and particularly relates to a heterocyclic derivate tyrosine kinase inhibitor shown in the formula (I), a pharmaceutically acceptable salt and ester thereof and stereoisomers thereof, wherein Y, W, Q m, L, R1, R2, R3, R4, R5, R6, R7, R7', R8 and R8' are defined in the specification. The invention further relates to a preparation method of the compounds and a pharmaceutical preparation and pharmaceutical compositions containing the compounds, and application of the compounds as the tyrosine kinase inhibitor for preparing medicine for preventing and/or treating cancer diseases caused by EGFR mutation and drug resistance diseases caused by EGFR T790M mutation.