This paper discusses the problem of object-oriented compiler construction, with a bias to the design of components operating on abstract syntax tree (AST) and responsible for certain compilation phases. Employing traditional modular design, it would be natural to organize such components as modules. However, in the case of canonical object-oriented design, the code previously put in a separate module has to be distributed over a variety of classes. This may negatively affect further system maintainability. This work describes a novel approach that combines advantages of both modular and OO techniques of the compiler design. The proposed method has proved its viability during the creation of production level compiler components. An implementation technique for the advocated approach using modern object-oriented languages (e.g. Java, C++) is also described. Keywords: formal semantics, formal model, imperative language, Abstract State Machines, formal methods, storable locations.