simplify function is_ECMA_end()