private void printSemiIfNeed(JsNode node) {
        if (!(node instanceof JsFunction) &&
            (node instanceof JsLiteral ||
             node instanceof JsInvocation ||
             node instanceof JsArrayAccess ||
             node instanceof JsBinaryOperation ||
             node instanceof JsUnaryOperation ||
             node instanceof JsOperator ||
             node instanceof JsNameRef)) {
            semi();
        }
    }