feat(compiler): support events